You are not logged in.
finding number of arrangements of the word
in which neither follow nor follow neither follow , isOffline
Hi;
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Seek some clarification.Is( O follow L follow A) i.e. O and A not next to each other allowed?
{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}
Offline
{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}
Offline
Is there no further discussion on this topic?
{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}
Offline
I got that idea from here.
Although not defined in the puzzle wording, I've taken "follow" to mean "immediately follow": ie, the nominated letters are adjacent pairs, with the second being after the first (l to r).
Using M and Excel, I got the same answer by filtering out invalids from the list of permutations.
Last edited by phrontister (2017-01-30 12:51:24)
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
That I believe is the correct answer for that particular interpretation of the problem.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Hi Bobby;
I used M to give me the list of permutations and pasted that into Excel where I could quickly filter out the invalids, leaving a count of 432.
I gave up trying to do all that in M because it was taking forever to work out how to select just the valid cases. My M knowledge in that area is very weak.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
Want some help with the M code?
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Yes, please. I'd like to know in which direction to start looking, so I can save on shoe leather.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
s = Permutations[{o, r, a, c, l, e}, {6}];
DeleteCases[s, {___, a, o, ___} | {___, e, a, ___} | {___, o, e, ___}] // Length
That is one of just many possible ways. This way uses patterns
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Works well!
I like that way, filtering out invalids.
I got the permutations like you did, but then got stuck trying to select valids.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
Hi;
A little bit difficult to select valids.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Yes, I can see that. My failing here was that when I couldn't succeed down that road I switched to the way I knew - filtering with Excel - instead of trying the same in M.
Thanks for your code!
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
when I couldn't succeed down that road I switched to the way I knew - filtering with Excel - instead of trying the same in M.
That is not a mistake. It is the first tenet of intelligent problem solving. Reduce all problems to ones you know how to solve. I suppose you have had to listen to me ramble on about the teakettle principle. My favorite two people who have had to endure my ranting are anonimnystefy and Agnishom. It is your turn now...
http://www.mathisfunforum.com/viewtopic … 05#p122105
Those two super giant intellects I was speaking to did not embrace the idea.
But the teakettle does not restrict you from improving. Instead of M to Excel then solve you can just use M to solve.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Ok...onwards and upwards.
mathsyperson was very insightful. Said some good stuff.
Last edited by phrontister (2017-01-31 11:30:41)
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
Anyway, if the OP meant something else then it is all moot.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
Thanks Admin, Bobbym,phrontister
Offline
Hi;
You checked the answer?
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
This is how I got my result
N(AE)=no.of arrangements where A and E come together as AE=5!=120
Similarly N(EO=N(OA)=120
N(OAE)=4!=N(AEO)=24
N(AE-OAE-AEO)=Number of arrangements where AE is neither immediately preceded by O nor immediately followed by O=120-24-24=72
N(OA-OAE)=120-24=96
N(EO-AEO)=120-24=96
So the number of invalid arrangements=96+96+72+24+24=312
No of valid arrangements=720-312=408
Where did I err?
{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}
Offline
It looks to me like there are intersections in your sets. So when you subtract them all you overcount.
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline
I forget exactly how I arrived at my formula in post #6, but I think the method is wrong, even though it gives the correct answer.
I'm now getting this:
Last edited by phrontister (2017-02-04 13:21:10)
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
Hi thickhead;
N(AE-OAE-AEO)=Number of arrangements where AE is neither immediately preceded by O nor immediately followed by O=120-24-24=72
N(OA-OAE)=120-24=96
N(EO-AEO)=120-24=96
Where did I err?
In the first equation you allowed for the occasions where O both precedes and follows AE, but in each of the other two equations you left an occasion out.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson
Offline
yes phrontister, I had hellucination.i wrote down religiously OAEO as mentioned in the problem, noted O should neither follow or precede AE. I thought OA and EO have no such restraint.but if I had written further the sequence AEO I would have realized. Perhaps in the background of my thoughts I felt it is because EAO/OEA is not barred.
{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}
Offline
Interestingly, this has a parallel with what is taking place in the other thread!
In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.
Offline