All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
No copying, students (Posted on 2019-05-10) Difficulty: 2 of 5
There are 5 students S1, S2, S3, S4, S5 in a music class and for them there are 5 seats in a row. On examination day, all five students are randomly allotted the five seats.

What is the probability that no student is seated next to another student with a number that differs by 1?

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer-aided solution | Comment 1 of 3
DefDbl A-Z
Dim crlf$



Private Sub Form_Load()
 Text1.Text = ""
 crlf$ = Chr(13) + Chr(10)
 Form1.Visible = True
 DoEvents
 
 s$ = "12345": h$ = s
 Do
  good = 1
  For i = 1 To 4
   If Abs(Val(Mid(s, i, 1)) - Val(Mid(s, i + 1, 1))) = 1 Then good = 0: Exit For
  Next
  If good Then ct = ct + 1
  permute s
 Loop Until s = h
 
  
  
  
 Text1.Text = Text1.Text & ct & " done"
End Sub

finds that 14 of the 5!=120 permutations have no adjacencies that differ by 1, for a probability of 7/60.

  Posted by Charlie on 2019-05-10 14:15:08
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information