pracexam1sol

pracexam1sol -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: SOLUTION
for
Practice
Exam,
CMSC
250
 
 These
questions
are
intended
to
provide
a
reasonably
complete
overview
of
the
 concepts
we
have
covered
so
far
this
semester.

The
actual
exam
will
have
 somewhat
fewer
questions,
but
drawn
largely
from
this
general
type
of
question.
 Since
there
was
no
homework
set
on
the
most
recent
material,
these
questions
 include
a
bit
more
on
that
material
than
will
be
on
the
exam,
in
order
to
provide
 extra
practice.
There
may
also
be
some
True‐False
or
Multiple‐choice
questions
due
 to
lack
of
time
for
“problem‐questions”
on
all
topics.
 
 1. Is
√2
<
√2
?


EXPLAIN.

The
LHS
is
the
sq
root
of
2,
about
1.4;
the
RHS
is
the
 ceiling
of
about
1.4,
namely
2.
So
the
ineq
is
correct.
 
 2. Which
real
numbers
x
satisfy

x
=
x
?


(Find
the
maximum
domain
for
x.)
 The
only
way
a
(real)
number
can
be
its
floor
is
if
it
is
an
integer.
So
the
truth
 set
(or
domain
where
the
equation
holds)
is
simply
the
subset
Z
of
R.
 
 3. Is
the
following
argument
form
valid?
If
so,
show
it
is
valid;
if
not,
show
it
is
 not:

It
is
not
valid.
There
is
no
way
to
get
~R
from
the
premises.
Here
is
a
proof:
 Look
at
a
truth­table
row
in
which
R
is
true
and

P
is
false;
that
will
make
all
 three
premises
true,
and
the
conclusion
false.
But
that
cannot
happen
for
a
 valid
argument.
 Step
number
 Statement
form
 
 1.

 2.
 3.
 4.
 P
‐>
Q
 Q
‐>
R
 ‐P
 ‐R 
 Premise
 Premise
 Premise
 Conclusion
 
 4. Give
a
number
domain
containing
the
number
10,
such
that
the
following
 sentence
is
true,
with
the
usual
interpretation
of
the
mathematical
symbols:





















 ∃z

∀x

∀y
[
x‐y
≤

z
]
.


EXPLAIN.
The
domain
{0,10}
having
0
and

10
as
its
 only
elements
will
do.

Just
let
z=10;
any
difference
x­y
between
two
of
those
 elements
is
either
­10,
0,
or
10,
so
the
absolute
value
is
≤
10=z.
 
 5. Give
a
number
domain
containing
the
number
10
such
that
the
sentence
in
 problem
4
is
false
(again
with
the
usual
interpretations
of
the
symbols).

 EXPLAIN.

The
domain
R
will
do;
there
is
no
z
in
R
such
that
all
differences
 between
elements

are
no
larger
than
that.

In
particular,
for
any
real
z,
we
 have
that
|
(1+|z|)
–
0
|
>
z,
so
letting
x=1+|z|
and
y=0
makes
|x­y|>z.


(The
 reason
this
does
not
happen
in
the
answer
to
prob
4
where
z
is
10,
is
that
then
 1+z

is
11,
which
is
not
in
the
domain
{0,10}
at
all,
so
it
is
not
a
possible
value
 for
x.)
 
 
 

 6. Prove
that
for
all
natural
numbers
x,
if

x^4
≡3
0
,
then
x
≡3
0
.


(Recall

a
≡d
b

 means
a‐b
is
divisible
by
d.)

Use
the
unique
factorization
theorem
(UFT).

 Suppose
x^4
=
3m.
So
(x^2)
(x^2)
is
divisible
by
3,
and
since
3
is
prime
then
(by
 a
Lemma)
x^2
is
divisible
by
3.

We
then
have
x^2
=
x
x
divisible
by
3,
and
by
the
 same
Lemma,
so
is
x.
So,

x
≡3
0.
 7. Prove
the
same
result
as
in
problem
6—but

do
notuse
UFT.
Suppose
x^4
=
 3m;
consider
the
remainders
when
dividing
x
by
3:
0,1,2.
These
give
us
three
 cases,
and
we
want
to
rule
out
the
cases
1
and
2,
to
conclude
that
the
 remainder
is
0
and
that
x
itself
is
divisible
by
3.

Case
1:
x
=
3k+1.
Then
x^4
=
 3^4
k^4

+

4(
3^3
k^3)

+

6(3^2
k^2)

+

4(3k)

+
1

=

3(…)
+
1
≡

1
(mod
3).

 But
this
cannot
be,
since
we
know
x^4
≡
0
(mod
3).

So
case
1
cannot
happen.
 Now
case
2:
x=3k+2.
Again
we
calculate
x^4
=
3^4
k^4

+

4(
3^3
k^3)
2

+

 6(3^2
k^2)2^2

+

4(3k)2^3

+
2^4

=

3(…)
+
2^4
≡
2^4
=
16
≡

1
(mod
3).

So
 this
case
cannot
happen
either;
and
thus
only
case
0

(x≡3
0)
can
–
and
so
must
 –
hold.
 
 
 
 
 8. Show
that
3^(1/4)
is
irrational,
using
the
result
in
problems
6
and
7.

 Suppose
not:
suppose
3^(1/4)
is
rational,
hence
3^(1/4)
=
m/n
for
suitable
 integers
m
and
n.
Then
3
=
m^4
/
n^4
so
m^4
=
3n^4
and
thus
m^4
is
divisible
 by
3.

But
by
the
result
in
probs
6
and
7,
this
means
m
is
divisible
by
3:
m=3k
for
 some
integer
k.
So
m^4
=
(3k)^4
=
3n^4,
and
then
3^3
k^4
=
n^4;
and
this
 means
also
n^4
is
divisible
by
3,
and
so
then
is
n.
Thus,
m
and
n
must
both
 divisible
by
3.

But
this
cannot
be
since
m/n
is
simply
a
rational
number
of
some
 particular
value
(namely
3^(1/4))
and
that
cannot
force
both
numerator
and
 denominator
to
have
the
factor
3.
So
the
supposition
that
3^(1/4)
is
rational
 must
be
wrong,
so
3^(1/4)
is
not
rational,
hence
it
is
irrational.
 9. The
only
way
a
conditional
statement

P
‐>
Q

can
be
false
is
if:



P
is
true
and
 Q
is
false.
 10. Describe
in
English
how
truth
tables,
disjunctive
normal
form,
circuit
design,
 and
propositional
statement
forms
are
related.

Be
brief:
20‐30
words
only.

A
 circuit
has
a
description
as
a
logic
statement,
which
has
a
unique
truth­table,
 that
gives
a
unique
disjunctive
normal
form,
which
leads
to

a
circuit
with
the
 same
input­output
as
the
original
one.
 
 11. State
the
Quotient‐Remainder
Theorem
(QRT).

Given
integers
n
and
d
with
 d>0,
there
are
unique
integers
q
and
r
such
that
n
=
qd
+
r
where
)
0
≤
r
<
d.
 
 
 
 
 12. Prove
the
QRT
using
floors.

Let
q
=
n/d
and
r
=
n
–qd.

Then
from
the
 definition
of
floor,

q
≤
n/d
<
q+1.
So
qd
≤
n
<
qd
+
d
(since
d>0).,
and
then
0
≤
n­ qd
<
d,
i.e.,
0
≤
r
<
d.

This
shows
q
and
r
exist.

(Uniqueness
follows
from
the
fact
 that
if
q’
were
larger
than
q,
using
it
as
quotient
would
force
r
to
be
negative;
 and
if
q’
were
smaller
than
q,
using
it
as
quotient
would
force
r
to
be
larger
 than
d.

This
is
easy
to
check.)
 13. True
or
false:

∃x
ε
R


3x


=

3

x

.


JUSTIFY.

True:
let
x
=
0,
for
instance,
or
 any
integer
at
all,
since
then
the
floor
of
x
is
just
x,
and
the
floor
of
3x
is
just
3x.
 
 
 14. True
or
false:

∀x
ε
R


3x


=

3
x

.

JUSTIFY.

False;
this
does
not
hold
when
 x
=
1/3,
for
instance.
The
floor
of
1/3
is
0,
so
the
RHS
is
0;
and
the
floor
of
3x
=
1
 is
then
the
floor
of
1,
so
the
LHS
is
1.
 15. One
of
the
following
is
always
true
and
one
is
not
always
true.
Which
is
 which?



EXPLAIN.





The
first
one
is
always
true:
if
one
fixed
x=x0
works
 (makes
P
true)
for
all
the
different
y
values,
then
for
any
y
there
is
an
x
that
 works,
namely
that
same
x0.






But
just
because
each
y
has
some
x
that
works
 with
it,
does
not
guarantee
that
one
fixed
x
works
for
all
y.

(Intuitively:
If
one
 person
loves
everybody,
then
everybody
is
loved
by
somebody.




But
if
 everybody
is
loved
by
somebody,
it
does
not
follow
that
everybody
is
loved
by
 one
and
the
same
person.



































































































 ∃
x
∀
y
P(x,y)


∀
y
∃
x
P(x,y)
























































































 ∀
y
∃
x
P(x,y)


∃
x
∀
y
P(x,y)


 


 16. Give
the
definition
of
logical
equivalence
of
two
statement
forms:


S1

≡

S2




 means

“in
each
row
of
a
common
truth‐table
for
the
two
forms,
both
forms
 have
the
same
truth­value”.
 
 17. Are
these
two
forms
logically
equivalent”

If
so,
prove
it;
if
not
prove
not.








 (∼
P

&
~R)

and

~(~P

R).

EXPLAIN
your
proof.

Yes,
equivalent.
The
 second
says
that
~P

R
is
false,
which
means
that
~P
must
hold
and
R
must
 not,
i.e.,

~P
&
~R.
 
 
 18. Prove
or
disprove:

if
a
≡m
b,
and
c
≡m
d,
then
a‐c
≡m
b‐d.

This
is
true.
Let
the
 first
two
congruences
hold.
Then
m
|
a­b
and
m
|
c­d,
so
a­b
=
km
and
c­d
=
rm.
 Subtracting
gives

a­c
–
b
+
d
=
(a­c)
–
(b­d)
=
(k­r)m.
So
(a­c)
≡m
(b­d).
 19. USE
UFT
to
show
that


70,000

=/=

49
x
25
x
64.

(Do
not
multiply
the
RHS.)

 70,000’s
prime
factorization
has
only
the
prime
powers
7^1,
2^4,
and
5^4
 (since
it
is
7x10^4).
But
the
RHS
has
two
factors
of
7,
so
they
cannot
be
equal.
 ...
View Full Document

This note was uploaded on 12/04/2011 for the course CMSC 250 taught by Professor Staff during the Spring '08 term at Maryland.

Ask a homework question - tutors are online