home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol243 / near.com (.txt) < prev    next >
Encoding:
Turbo Pascal Compiled 8bit CP/M-80 COM  |  1986-02-10  |  10.1 KB  |  72 lines

  1. Copyright (C) 1984 BORLAND Inc
  2. Pseudo TeleVideo 910P
  3. C0000
  4. ^#V#N#F
  5. s#r#q#p
  6.     #^#V
  7. 9^#Vh&
  8. |/g}/o#
  9. T]=o`9y
  10. T9^K#
  11. 8/<oz
  12. T9^K#
  13. oGOW_g
  14. `1pF,
  15. w###6
  16. ##N#F*
  17. Nw#Fw
  18. q#p#6
  19. #w#w#w
  20. TRUEFALSE
  21.     N#F#s#r
  22. N#F#^#V
  23. " C}=(
  24. F+N+++V+^
  25. q#p##
  26. User break
  27. Run-time
  28.  error 
  29. , PC=
  30. Program aborted
  31. CThis program is a Monte Carlo computation of the following problem.
  32. @Given random points in the plane, what is the probability that a
  33. @point's nearest neighbor has as IT's nearest neighbor, the first
  34. point?
  35. 'TURN THE PRINTER ON before we continue.
  36. Did you turn the printer on?   
  37. Well go turn it on
  38. E RESULTS of NEAREST NEIGHBOR TEST on TURBO PASCAL RNG
  39. /Good, now how many points per run do you want (!
  40.  max)? 
  41. How many runs do you want (!
  42.  max)?    
  43. G EACH RUN HAS *
  44.      POINTS
  45. 8+)]T)
  46. 8+)]T)
  47. 8+)]T)
  48. 8+)]T)
  49. 8+)]T)
  50. 8+)]T)
  51. 8+)]T)
  52. 8+)]T)
  53. +)]T)
  54. 8+)]T)
  55. 8+)]T)
  56. 8+)]T)
  57.  There were *
  58.  commuting points out of
  59.  the probability was therfore !
  60. 8+)]T)
  61.  probability = !
  62. 8+)]T)
  63. 8+)]T)
  64. 8+)]T)
  65. The average so far is     !
  66. The standard deviation is !
  67. The average so far is     !
  68. The standard deviation is !
  69. 8The nearest neighbor problem may be solved analytically.
  70. 3The result is  6pi / ( 8pi + 3 SQRT(3) ) = 0.621505
  71. he nearest neighbor problem may be solved a
  72.