An Algorithmic and Social Introduction to Computer Science (CSC-105 2000S)

Model some set of relationships (preferably something other than family trees) with the predicate calculus.



I thought that maybe the Residence Life staff organization could be depicted using predicate calculus, something like this:

First, you'd want to define who does what:

Random students would also need to be defined as something like student(lastname, dorm, floor)

[I'm not really sure if this is the way to define these terms, or if I should create different ones through if-then statements along the lines of RLC(Mounsey) --> supervisor(Main, Cleveland)]

You could also say that

Now that you know these things, you could ask: Does there exist an SA(anydorm) or RLC(anydorm)

Who is the supervisor of some SA ("Does there exist supervisor(SA, RLC)"): For all a,b,x,y,z (SA(x, y, z) and (RLC(a, y, b) or RLC(a, b, y))) --> supervisor(x, a)

Who is the SA and RLC of some student ("Does there exist advisee(student, SA, RLC)"): For all a,b,c, x,y,z (student(x, y, z) and SA(a, y, z) and (RLC(b, y, c) or RLC(b, c, y))) --> advisee(x, a, b)


Given the fact that all people in their 20s who live on Grinnell's campus are students, is Emily a Grinnell student?


I believe that you could model your decisions about a group of jobs with predicate calculus, and that's mostly what interests me right now. Something like this, and please let me know if this doesn't make sense, because I don't completely understand the relationship of predicate calculus to computer applications:

If, Qualified applicant (Jae), then good starting position (Jobs 1-X) for jobs having these dynamics:

Such that if A ^ B ^ C ^ D, for Job X (A,B,C,D) then Job X (Jae) for all max (A,B,C,D).



x- symbol of meal

R = Red Sauce

P = Pesto

W= Alfredo

y-symbol of beverage

w=white wine

r= red wine

m= merlot

h= water

z- symbol of dessert

c = chocolate dessert

f= pie

p = pudding dessert

not red sauce and pesto and alfredo ~(R_ P_ W)

if pesto (x) then goes with (x, white wine); P then w

if red sauce (x) then goes not with (x, white wine or water); R then ~[w_ h]

if alfredo (x) then goes with (x, merlot and water); W then [m] h]

if red sauce and merlot then goes with (x,y chocolate dessert); R] m then c

if (x,z) go with white wine, (x,z) go with each other

if (x,z) go not with water, (x,z) go not with each other

if (x,y,z) go with each other, then recommend meal (x,y,z)

no (x,y) exists such that pudding should be consumed; x,y(~(p))


In the wake of March Madness, I would like to model the NCAA Basketball Tournament with the predicate calculus. Using the logic symbols: -> implication, ~ negation, V disjunction (or), & conjunction (and), A universal quantification (forall), E existential quantification (exists), I would determine who won or lost the game and allow the winner to continue, while the loser would be automatically eliminated. I could also use logical connectives (~ V & -> ), which group propositions into expressions whose truth values are defined (in truth tables) as a function of the truth values of the propositions which are connected, to connect the teams with past records to predict the most likely outcome of the game.


The problem is to find a friend in Grinnell with whom I both work and have had a class. A couple of unimportant relationships to this problem have been included.

Some rules (I don't know how to type the symbols so I'm writing this out):

no other members of friends(X) are included in both inClass(X) and atWork(X) therefore, Jake is a friend of mine in Grinnell with whom I work and have had a class. Problem solved!!


V is the upside-down A for "all"

Vactors grinnell(actor, good) All actors from Grinnell are good


Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

This page may be found at

Source text last modified Wed Feb 16 08:16:07 2000.

This page generated on Fri Apr 14 09:32:43 2000 by Siteweaver. Validate this page's HTML.

Contact our webmaster at