The Student Room Group

Computing Question (AQA, CPT4)

I'm really stuck on this question - I'm absolutely useless at logic processing algorithms like this. :confused:

(1) father (alan, edward)
(2) father (chris, fiona)
(3) father (chris, jane)
(4) father (edward, liam)
(5) mother (barbara, edward)
(6) mother (diana, fiona)
(7) mother (diana, jane)
(8) mother (fiona, liam)
(9) mother (jane, michelle)
(10) grandfather (W,X) IF father (W,Z) AND mother (Z,X)
(11) grandfather (W,X) IF father (Z,X) AND father (W,Z)

Clause (1) says that alan is the father of edward.
Clause (10) says that W is the grandfather of X if W is the father of Z and Z is the mother of X.

(a) Use the above information to find liam's grandfathers, clearly identifying the relevant clauses in each case. (2 marks)

(b) Two people are cousins if they have the same grandfathers. Write a clause which would define cousin. (3 marks)
Reply 1
Never really covered logic programming yet, but i assume The grandfather of liam would be the father of liams father (Or mothers father). The father of liam is edward, due to: (4) father (edward, liam)

So now you're looking for the farther of edward:
(1) father (alan, edward)

So Liams grandfather is Alan.

And i guess grandfather would also include the mothers side, so the mother of Liam is fiona:
(8) mother (fiona, liam)
And the father of fiona (Liams grandfather on his mothers side) is Chris
(2) father (chris, fiona)

So the grandfathers are Alan and chris?

Not really sure how you'd write the clause for that though, so i guess im not much of a help.
Reply 2
Quite simple its common sense the clause would be:

cousin(X,Y) IF grandfather (W,X) AND grandfather (W,Y)

you dont have to use W u can use whichever letter u want.
Thanks for trying :smile:

Does anyone else have any ideas? I really need the methodology behind working out the answer - the exam's on Tuesday :frown:
Reply 4
exam on tuesday, doesnt help i havent been taught the whole year


trying to cram it all in now with a lack of good resources


Heathcoat book really sucks on defintions and stuff


What are AQA thinking? its like trying to do an exam where you know you can only get a max of 60% because ur resources suck
a) From Clause (4) Liams Father is Edward
From Clause (8) Liams Mother is Fiona

From Clause (1) Edwards Father is Alan
From Clause (2) Fionas Father is Chris

Using Clause (10)
grandfather (Chris,Liam) IF father (Chris,Fiona) AND mother (Fiona,Liam)
Therefore Chris is one of Liams grandfathers

Using Clause (11)
grandfather (Alan,Liam) IF father (Edward,Liam) AND father (Alan,Edward)
Therefore Alan is the other of Liams grandfathers

b) cousins (X,Y) IF grandfather (W,X) AND grandfather (W,Y)

This states that If W is the grandfather of X and W is the grandfather of Y then X and Y are cousins.

When writing clauses dont forget to put the IF,AND,OR etc always in capitals and always have the variables in round brackets separated by commas. Else you will be docked marks! harsh but true!
Reply 6
So glad i aint doin CPT4 again having got a good grade in january.

Mind you, CPT5 on tuesday is gonna be a bitch!
Reply 7
watford110
So glad i aint doin CPT4 again having got a good grade in january.

Mind you, CPT5 on tuesday is gonna be a bitch!


wat did u get in jan? i got 49/90 :frown:

friday13th use mark schemes for definitons thats wat ive done...ye the heathcote book is shit generally but oh well..AQA have just brought out a new book just when we fuckin finish our exams.
What did you guys get in your coursework?
Reply 9
my teacher said i got 35/60, but she kept changing her story


stupid freak, doesnt know how to mark courseworks
Reply 10
Surfing Hamster
What did you guys get in your coursework?


got an A but he wudnt tell me my mark :frown:
jay9386
got an A but he wudnt tell me my mark :frown:

Same here. :smile:
Reply 12
I did a website using PHP and mySQL

60-70 page write up, at first it was 40... then i heard from a friend she gave me a U.... IMPOSSIBLE

Us are for people that dont do work, 40 pages, no matter how shit needs an E at least.

Anyway i did 20 more pages, and she claims i got 35... but she is lying, and has screwed me out of university im sure.

They need to get rid of Computing A level, the shittest a level of them all.

The examiners probably dont even use computers and have just based questions on what they have read...

I only got 50/90 on module 5 in january, i think i should have got higher, but i dont want to risk 30 quid to get it remarked, so im retaking it on tuesday.

Basically my teacher hasnt taught module 4, period. I was trying to revise it today, but we NO prior knowledge its quite hard....

Thing is, i dont care enough about computing to try in it anyway, i'd be Happy with A's in maths and physics, unforunatly i need a B in computing to get into warwick.
our comp. teacher wudn't tell us our marks, so i nicked the sheet containing all the scores when he went out of the room :smile:
Reply 14
s-man
our comp. teacher wudn't tell us our marks, so i nicked the sheet containing all the scores when he went out of the room :smile:


oh u bad boy
computing exams have got to be the easiest of all a level exams, trouble is.....its gotta also be the worst taught subject ever, IT teachers who actually dont have a clue.

I got 101/105 and 99/105 last year but got a D in teh coursework, still managed to get an A tho, but my teacher would only put a B as my ucas grade even tho i complained...and now, he screwed me over on my coursework....he tryin to cover his back now and ensure i get a B like he said, after the fuss i kicked up...

...after months of gettin called a dick head by him when no ones lookin...

..i handed in my project months ago and scored low marks on all sections....i basically doubled the amount i did and corrected everything he said....then he goes and asks it in the day before he needs to send off marks....and he does not remaark any of it!? i had a fully workin advanced system programmed in pascal, no one else in my class had one workin, saving, printing report etc..and yet i got the lowest mark ....

Latest

Trending

Trending