brian bovril

889 Reputation

16 Badges

18 years, 299 days

MaplePrimes Activity


These are replies submitted by brian bovril

@Carl Love 

Re the aside, maybe I didn't explain myself. Looking at the output of res[2], I want to extract the non-zero answers.
In the above expression, x[3]=6. For ease of reading, I want it to report "30=6x5" or "30=5+5+5+5+5+5".So it needs to map the third prime as a multiple of 6.

As another example, PF(44,10) yields x[1]=1,x[6]=1,x[10]=1. I want "44=2+13+29"

@Carl Love it would be more instructive for maple to report an error or display "undefined" rather than a definative answer like "false".

@Kitonum 

thanks for your interest.

But when i put in these values, unless i've cocked up, the tests for square and triangular number fail:

unprotect(D);
> d:=3515820*n;                             

          5.414603381 10^206543 
> B:= (1243419/585970)*d; D:= (367903/175791)*d; W:= (246821/83710)*d; Y:= (125739/106540)*d; b:= (815541/585970)*d;  w:= (17158/8371)*d; y:= (1813071/1171940)*d;
                                   

> B+D+W+Y+b+d+w+y;
                         7.760263432 10^206544 
> is(sqrt(W+B),integer);
                             false
> is(-3/2+(1/2)*sqrt(1+8*(D+Y)),integer);
                             false

@Kitonum thanks

what about the square and triangular # constraints (see above reply to Carl).

@Carl Love my attempt was to search for solutions in a given space.  But your and Kitonums solutions are better.

what about the second part of his question, the square number and triangular number constaints.

is(sqrt(W+B),integer)=true and is(-3/2+(1/2)*sqrt(1+8*(D+Y)),integer)=true

is it possible to put these into isolve?

i realise the numbers are absolutely massive

 

@Christopher2222 thanks, that works!

@Carl Love my code throws up words like "weird" and "glacier" which contradict the law, but also "receive" and "ceiling" which obey the law.

i only want contradictions, so need code to search the dictionary for words containing "cie" and "ei", then search this sieved list for words containing "cei" and remove them from the output. I think it needs a second loop.

@Christopher2222 thanks.

Thats where the 923 comes from,but I think there is more.  The above code returns words containing CIE, but what about other words like "weird". "i before e.....".

What I want is code to throw out words like "ceiling" which obeys the law, but prints contradictions like "weird" and "glacier".

@acer and C.Love thx

@Joe Riel Hi Joe and thanks for your efforts. I installed Iterator-2-3-2 but I can't find the option "include-change" and the example. can you direct me?

@Carl Love 

the answer is at the bottom:

(One of 11)

http://www.mamamia.com.au/social/pisa-results-shows-australias-failing-education-system/

 

@Carl Love thanks Carl.

Is there a command in your logic package which is the opposite of the NextTo command?

@Carl Love on my worksheet (what a surprise it didn't load,not)  the sixth constaint flumuxed me. u fixed it.

Meeting the Challenge Puzzle

I hope you can help fill in the Con 10,11,20,22 gaps.

lifted from http://www.mathsisfun.com/puzzles/meeting-the-challenge-solution.html

Vars:= [Wife,Husband,Occupation,Car,Color,Brought,Borrowed]:

#its clear owen and Victoria, Irene and Oto, and Pamela must have surnames either swain, kuril or zajac.

Wife:=[Daniella_B,Hannah_H,Veronica_D,Jenny_S,Monica,Victoria,Irene,Pamela]:

Husband:=[Stan_H,Owen,Alex,Mathew,Oto,Robert,Paul,Rick]:

Occupation:= [shop,ware,acc,ticket,docs,teach,agri,shoppers]:

Car:=[fiat,wartburg,trabant,ziguli,moskvic,skoda,renault,dacia]:

Color:= [red,brown,white,pink,green,blue,violet,yellow]:

Brought:=[mul,shed,grand,dame,modern,seadog,slov,mulatka]:

Borrowed:=[mul,grand,dame,we_were_five,modern,slov,mulatka,????]:

Con1:= Daniella_B=shop: Con2:= seadog=fiat,fiat=red: Con3:= Owen=brown,Victoria=brown: Con4:= Stan_H=white,Hannah_H=white: Con5:= Jenny_S=ware:

Con6:= Monica=grand,Alex=grand: Con7:= Mathew=pink: Con8:= Irene=acc,Oto=acc: Con9:=we_were_five=trabant:

Con10:=: Con11:= :

Con12:= Paul=green:Con13:= Veronica_D=blue: Con14:= Rick=slov,Rick=ziguli: Con15:= dame=mulatka: Con16:= dacia=violet: Con17:= teach=dame: Con18:= agri=moskvic:Con19:= Pamela=renault,Pamela=grand:

Con20:= :

Con21:= Robert=yellow,Robert=modern:

Con22:=:

Con23:= modern=skoda:

 read "LogicProblem.mpl";

Couples:= LogicProblem(Vars):

with(Couples);

Satisfy([Con||(1..23)]);

 

 

 

First 13 14 15 16 17 18 19 Last Page 15 of 26