brian bovril

889 Reputation

16 Badges

18 years, 301 days

MaplePrimes Activity


These are questions asked by brian bovril

Birthday_LP.mw

I am attempting to solve the following using C.Loves Logicproblem package. But i do not know how to tell it either/or constaints. being a circular arrangement might also throw a spanner in the works.

Alans Birthday Logic Problem

It is Alan’s birthday and he is having a party. Seven other people will attend: Amy, Brad, Beth, Charles, Debbie, Emily and Frances.

Everyone will sit around the circular dining table. The seating arrangement must meet the following conditions:

• Amy and Alan sit together

• Brad and Beth sit together

• Charles sits next to either Debbie or Emily

• Frances sits next to Debbie

• Amy and Alan do not sit next to either Brad or Beth

• Brad does not sit next to Charles or Frances

• Debbie and Emily do not sit next to each other

• Alan does not sit next to either Debbie or Emily

• Amy does not sit next to Charles

Arrange the guests around the table to meet all of the conditions listed above.

restart:

Vars:= [Name,PN]:

Name:= [Alan,Amy, Brad, Beth, Charles, Debbie, Emily,Frances]:

PN:=[$1..8]:

Cons:= [NextTo(Amy,Alan,PN),NextTo(Brad,Beth,PN),NextTo(Charles,Debbie,PN),NextTo(Charl es,Emily,PN),NextTo(Frances,Debbie,PN),Rel(NotNextTo,Amy,Brad,PN),Rel(NotNextTo, Amy,Beth,PN),Rel(NotNextTo,Alan,Brad,PN),Rel(NotNextTo,Alan,Beth,PN),Rel(NotNext To,Brad,Charles,PN),Rel(NotNextTo,Brad,Frances,PN),

Rel(NotNextTo,Debbie,Emily,PN),Rel(NotNextTo,Alan,Debbie,PN),Rel(NotNextTo,Alan,Emily,PN),

Rel(NotNextTo,Amy,Charles,PN)]:

read "LogicProblem.mpl";

Birthday:= LogicProblem(Vars):

with(Birthday):

 

 

Gentlepeople.

Given 6 teams [A,B,C,D,E,F] I require that each team plays each other once.

 I can generate the pairs:

lst:=combinat:-choose({A,B,C,D,E,F}, 2);  

{{A, B}, {A, C}, {A, D}, {A, E}, {A, F}, {B, C}, {B, D}, {B, E}, {B, F},  {C, D}, {C, E}, {C, F}, {D, E}, {D, F}, {E, F}}

On a competion night three pairs will compete and it will take 5 nights for all teams to play each other.

now I need some eredite richard who can show me how to produce the five night output:

(instead of comma a 'v' needs to be mapped)

AvF

BvD

CvF

.....

 

Gentlemen

I know the following:{A>E,F>Z,F<P,Z>E,P<A} , all real Numbers

can I get maple to sort these in order largest to smallest.

[in this case:  A>P>F>Z>E ]

Polya deals out cards from a deck one by one. How many cards must Polya deal out until he is sure that a flush (five cards of the same suit) has appeared amongst the dealt cards? What if Polya wants a straight (five cards in sequence, with an ace counting low or high)?

 The answers are 17 and 45, but how? in Maple?

for the flush the chances are 1/numbperm(13,5)/numbperm(4,1)

for the straight 1/10/numbperm(4,1)^5. 

http://www.math.hawaii.edu/~ramsey/Probability/PokerHands.html

 

 

 

First 21 22 23 24 25 26 27 Last Page 23 of 34