KEMBAR78
Diagrams For Prolog! Example Programs!: © Gunnar Gotshalks! | PDF
0% found this document useful (0 votes)
77 views6 pages

Diagrams For Prolog! Example Programs!: © Gunnar Gotshalks!

Uploaded by

Joseph Choi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views6 pages

Diagrams For Prolog! Example Programs!: © Gunnar Gotshalks!

Uploaded by

Joseph Choi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Diagrams for Prolog!

Example Programs!

Gunnar Gotshalks! ED-1



Graph Traversal!

An example graph!

a!
c!
b!

e! d!

f!

g!

Gunnar Gotshalks! ED-2



Figure 7.1 / 7.2!

Precedence graph for tasks A, B, C and D!

B-3 D-4

A-2

C-5 Finish

Gunnar Gotshalks! ED-3



Variation of Figure 7.1!

Project Evaluation and Review Technique!


PERT graph for tasks A, B, C and D!

Event2

D-4
B-3

Start A-2 Event1 C-5 Finish

Gunnar Gotshalks! ED-4



Deleting from Binary Tree!

Problem occurs when both left and right trees exist.!


Move a nearest neighbour to the root!

X Y

Gunnar Gotshalks! ED-5



Add X at Root of Binary Tree!

L R

X X<Y X>Y X

Y Y
L1 R2

L2 R L R1

Gunnar Gotshalks! ED-6

You might also like