SE250:lab-X:sgha014

From Marks Wiki
Jump to navigation Jump to search

used rajitha's instructions to compile it with cygwin

task 1

since theres 8 numbers in the puzzle, there are 8 possible states??

no no no thats not right....ok there are 9 squares so the number of states is 9! (9 factorial)

estimating the number of edges.... ok so wen the space is at the bottom, u hav 2 options of where to go. if u decide to go up, u then hav 3 options, and if u go to the left instead of going up, u also have 3 places to go. if u end up in the middle u have 4 options. ok so there are 4 corners...each with 2 differnt options...so thats 8 and 4 sides that each hav 3....so thats 12 and 1 middle place with 4 options... so 8+12+4=24

is it 24?? seems waaay too small

so the tutor didnt knw how 2 do it so i asked a aguy in the lab...and managed to get this: 24/9 =2.67 then there 9! states....so 9!*2.67 = 968889.2 then diviede by 2 coz we counted each thing twice => 484444.8 edges

task2

so iv bn on this task for aaaaages...trying to see wat the search thing does....makes no sense to me...its using lots of functions so im trying to look throuhg all teh files to see if i can find out wat each does....

task3

my first attemt was relly stupid...luckily the tutor pointed it out for me before i got too far ahead. so then i drew it9properly this time)...then used graph.c to check it and it was right woho :D

task4