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

Home > Probability
Roy G Biv (Posted on 2014-09-11) Difficulty: 3 of 5
There are seven friends having different nicknames: Red, Orange, Yellow, Green, Blue, Indigo and Violet. There are seven chairs colored: red, orange, yellow, green, blue, indigo and violet.
  1. No friend sat on a chair having a color that matches his name, and:
  2. Red did not sit in the violet chair, and:
  3. Orange did not sit in the indigo chair.
Determine the probability that:

(i) (Red, Orange, Yellow) = (blue chair, green chair, red chair)
(ii) Yellow did not sit on the blue chair and Green did not sit on the yellow chair.
(iii) Yellow sat on the green chair given that Green did not sit on the blue chair.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

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

Function mform$(x, t$)
  a$ = Format$(x, t$)
  If Len(a$) < Len(t$) Then a$ = Space$(Len(t$) - Len(a$)) & a$
  mform$ = a$
End Function

Private Sub Form_Load()
 Text1.Text = ""
 crlf$ = Chr(13) + Chr(10)
 Form1.Visible = True
 DoEvents
   
 a$ = "roygbiv": h$ = a$
 Do
   good = 1
   For i = 1 To 7
     If Mid(a$, i, 1) = Mid(h$, i, 1) Then good = 0: Exit For
   Next
   If Right(a$, 1) = "r" Then good = 0
   If Mid(a$, 6, 1) = "o" Then good = 0
   If good Then
     goodct = goodct + 1
     If Left(a$, 1) = "y" And Mid(a$, 4, 2) = "or" Then ct1 = ct1 + 1
     If Mid(a$, 5, 1) <> "y" And Mid(a$, 3, 1) <> "g" Then ct2 = ct2 + 1
     If Mid(a$, 5, 1) <> "g" Then
       greenNotInBlue = greenNotInBlue + 1
       If Mid(a$, 4, 1) = "y" Then ct3 = ct3 + 1
     End If
   End If
 
   permute a$
 Loop Until a$ = h$
 Text1.Text = Text1.Text & ct1 & "/" & goodct & "=" & mform(ct1 / goodct, "#.00000000000") & crlf
 Text1.Text = Text1.Text & ct2 & "/" & goodct & "=" & mform(ct2 / goodct, "#.00000000000") & crlf
 Text1.Text = Text1.Text & ct3 & "/" & greenNotInBlue & "=" & mform(ct3 / greenNotInBlue, "#.00000000000") & crlf
   
 Text1.Text = Text1.Text & "done"

 
End Sub

finds for parts (i), (ii), and (iii), respectively:

14/1300= .01076923077
933/1300= .71769230769
168/1101= .15258855586

The numerators and denominators are the actual counts, but the fractions reduce to

(i) 7/650
(ii) 933/1300
(iii) 56/367

  Posted by Charlie on 2014-09-11 16:36:33
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 (14)
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