[poll] If you are all gamers, then are you guys all smart?

ScOpE

I made one post
Joined
Feb 14, 2008
Messages
12
OK, this isn't a usual forum post, and most of you are going to laugh at me or get mad or something. But I'm having huge troubles with my homework. I've been to the tutors, TA's , the Professor, and friends. My friends are clueless, and the rest are useless...

So I turn to my fellow organization. I'm in a logical reasoning class, and I'm a little lost on proving theorems. The worst part is, they won't use real english examples in the homework. They use ACL2s programming language that I do understand, but makes the actual problem confusing. If anyone used a non-object-oriented program (scheme etc...) youll understand it. DOES ANYONE HAVE A CLUE ON WHAT TO DO. I'm not looking for answers, just explanations. (but I am open-minded on answers lol :P)



PROBLEM 1:
Let’s revisit the finite-set functions we saw in Homework 2.
We take a set to a be a true list of elements. Thus,
(defun setp (l)
(if (endp l)
(equal l nil)
(setp (cdr l))))
Set membership:
(defun set-memberp (a l)
(if (endp l)
nil
(or (equal (car l) a)
(set-memberp a (cdr l)))))
Set inclusion:
(defun set-subsetp (l m)
(if (endp l)
t
(and (set-memberp (car l) m)
(set-subsetp (cdr l) m))))
Set equality:
(defun set-equalp (l m)
(and (set-subsetp l m)
(set-subsetp m l)))
Union and intersection are straightforward:
(defun set-union (l m)
(if (endp l)
m
(cons (car l)
(set-union (cdr l) m))))
(defun set-inter (l m)
(if (endp l)
nil
(if (set-memberp (car l) m)
CSU290 Lecture Notes, Spring 2008 hw4.txt, page 2
(cons (car l) (set-inter (cdr l) m))
(set-inter (cdr l) m))))
Set size - recall that we do not count duplicate elements when we are
considering the size of a set, that is, {a,b,b,c,d} has size 4.
;; remove all occurrences of a from l
(defun remove-element (a l)
(if (endp l)
nil
(if (equal (car l) a)
(remove-element a (cdr l))
(cons (car l) (remove-element a (cdr l))))))
(defun set-size (l)
(if (endp l)
0
(+ 1 (set-size (remove-element (car l) (cdr l))))))
We are asking you to formalize and then prove the following conjectures.
This means that you should go through the following steps for each of
the questions below:
1. Write down a formula that expresses the conjecture we are asking
you to prove.
2. Then, try to prove the formula you came up with. Remember, first
try to come up with counterexample to get a sense of whether what
you are trying to prove is actually true.
3. If you are proving the formula by induction, make sure that you
clearly identify the proof obligations.
Some of these are hard, so make sure that you at least get the formula
you are trying to prove right, and get the proof obligations right.
For (a), recall that recall that a relation R is reflexive if x R x
for all x, a relation R is symmetric if x R y implies y R x for all
x, y, and a relation R is transitive if x R y and y R z implies x R z
for all x,y,z.
For (b)-(e), recall that a binary operation OP is commutative if
(x OP y) = (y OP x) for all x,y, and associative if (x OP (y OP z))
= ((x OP y) OP z) for all x,y,z.
(a) Prove that set-equalp is an equivalence relation, that is, that it
is reflexive, symmetric, and transitive.
(b) Prove that set-union is commutative.
(c) Prove that set-inter is commutative.
(d) Prove that set-union is associative.
(e) Prove that set-inter is associative.




If this thread is allowed moderator. Delete it :)
 
because I don't understand it, and everyone around me is useless...
 
I'm smart, but I don't understand this stuff. :) Come back to me when you have critical thinking/History/English questions. :)
 
Chuck Norris and Mr. T walked into a bar. The bar was instantly destroyed, as that level of awesome cannot be contained in one building.
 
[quote1205245372=√agrant]
The answer is simply 42
[/quote1205245372]

Yeah, but what's the question?
 
Heres the real question:

Come up with ONE example of using that in Real life that doesn't involve school or teaching
 
wow that looks like jibberish to me. i understand a little bit of c but i dont even know what that is.


p.s vagrant your avatar makes me no longer want to eat apples! back to junk food i go! lol
 
well idk what's up with that but all those parentheses and abbreviations just lsot me ><
 
Sorry, I can't help. I'm learning C++ right now. Btw what programming language is this?
 
It's not programming. It's... idunno what exactly it is. It's logic, and using rules of logic and stuff. Something like that.

I'm too tired to remember scientific terms for it. We did stuff like this in CS160/161 here, and will do more in CS200.
 
[quote1205296616=Flippy Squirrel]
Chuck Norris and Mr. T walked into a bar. The bar was instantly destroyed, as that level of awesome cannot be contained in one building.
[/quote1205296616]

amen to that =D
 

Latest posts

Back
Top