Ques 4 ) My routes. Line 1 = sequence, Line 2 = bool of movement movement, line 3 = airport number
C A C B C B B B B A A A C B A
1 0 1 0 1 1 1 0 0 1 1 1 1 1 0 == 10
0 0 0 0 0 4 2 2 2 4 1 2 4 2 2
A A A C A A B C C C B A B A C
0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 == 9
0 0 0 0 0 0 0 0 0 0 4 1 4 1 2
A A B A B C C B C A C A A C A
0 0 1 1 1 1 1 1 0 1 1 1 1 1 0 == 11
0 0 4 1 0 0 0 4 0 1 2 4 1 2 0
Also how did you manage to do the second!!
I made a logic (which can be wrong). First we know that the order for 1 is
E1 __ __ __ __ __ __ __ __ __ E6 L6 (E Enter , L leave and no represents train no)
and we can see the arrangements as shown
We can reach E2 from E1 in 2 ways and so on
If wrong please explain
Q2) part A logic. N = 6, K = 8. K = 8 means next four trains can enter in any order they like after which the last train must leave the yard. In any order because it doesn’t matter when they enter and leave each action costs 1 K and 4 trains entering and leaving will cost us 8 K. Now here are all the cases.Will will consider 6 fixed in all possible positions.
1*6*2345 ]- 2345 can be in any order so 4! = 24
12*6*345 ]- 345 and 12 can be in any order so 3!*2! = 12
123*6*45 ]- 45 and 123 can be in any order so 3!*2! = 12
1234*6*5 ]- 1234 can be in any order so 4! = 24
12345*6* ] - 12345 can be in any order so 5! = 120
24 + 12 + 12 + 24 + 120 = 192.
I tried to do part B with this method but it was very time consuming so I left it. I didn’t try C because I had given up.
EDIT: EXPLANATION.
What I have done is fixed the number 6 in the output place to a particular digit, then I am moving around whatever numbers I can to take a look at permutations. For instance in first line I say 2345 can be in any order. 2345, 5324, and so on can be created without hassle. I have taken its factorial. For those who don’t know what a factorial is google it and read about permutations. @superty Because we are having trouble with deciding the correct solution I suggest we both make a text file of our possible cases and then we can see the subset of non-intersecting cases and decide.
EDIT: THIS IS WRONG, This logic generates cases which are not possible.
@Organic-Shilling : Oh no! Blunder! I selected 3,5,8,9,10,13 but made a calculation mistake! ( Selection 8 : Added 18 instead of 6 (wrong step)) Aagh!.. Anyways I wish I could upvote (low reputation)(started using forums lately but no repo yet) THANKS
I posted how I solved Question 2 Part A, turn to the previous page. Your Q1 part a appears to be wrong, Mine also has B = 33 but my number is greater than yours. Q4 part b is 9 and part c is 12.