Q&A
- Q: [Unit D3 Ex1] I noticed that their might be an error
in the logic as defined at the beginning of the exercise. I'm not sure whether
or not you intended it to be this way, so I figured I'd ask. Here's the part
where (I think) there is an error: isTrue((not"q" or not"p") iff ("q" if
"p")) = F
If "p" = True and "q" = False, then should not this statement be true?
-Since "q" is false, the first part of the wff is true.
-Since "q" is false, the second part evaluates to true regardless of "p"
-True iff True = True
Is that reasoning correct? A: You are absolutely right. Sorry again. I've revised the exercise (unfortunately, it's too late). [8am, 12/2/03] - Q: [Unit D2 Ex] For the string replacement, the problem
states, "...would replace all occurances of the specified substring with
another substring...", so for the first example, "replace(inputString, in, out) = outputString", would it be: replace(inputString, in, out) = outputStroutg because in "inputString", "[in]putStr[in]g" need to be replaced? A: You are right. Sorry. I've fixed the exercise. [11/25/03]
- Q: [Unit D1 Ex] I have been trying to work out exercise
2a since yesterday, and I just cannot seem to figure out what about condition
1 and the definition of complement would cause condition 1 to be invalid. A:
Consider three countries, say, A, B, and C. Then, imagine a situation
corresponding to "enemy of enemy." What can you conclude with the available
information (including that "friend" is the complement of "enemy"? [11/19/03]
- Q: [Module C Comprehensive 3C] When you ask us what kind
of structure a regular expression or FSA would specify, are you asking whether
it is operational or relational? A:
Well, many of structures we discussed were operational or relational. But
there were also hybrid structures (both operational and relation) and
structures that are neither operational nor relational. Before classifying
the desired structure, think what they really are. [11/12/03]
- Q: How can we visualize complements in the Hasse diagram corresponding to a Boolean Algebra? A: View the diagram as an n-dimensional
(sort of) "cube." Then, the complement of a point is the furthest point.
Try this with 1, 2, and 3-dimensional Boolean Algebras. [11/12/03]
- Q: For question (2), in the diagram, there are two states that have the label '4'. Was that intentional? A: No. That is an error. Sorry, again. I've posted a revised version. [4pm, 11/11/03]
- Q: Doesn't one of the acceptable sequences in Exercise
3 violate one of the conditions? I refer to the sequence "GFCGEDEG". It would
seem that the first 'E' violates the part of condition 2 that states that
they always occur "in that order", seeming to refer to 'D' followed by 'E'. A:
You are right. Sorry. The first 'E' must be removed to be acceptable.
I just made the correction to the exercise. [7:30pm, 11/10/03]
- Q: When I got my Module B packet back, I noticed that
individual sections for the Comprehensive Exercise had no "Adjustment By
the Instructor". I figured that you simply might not have written them on
the sheets, but I found that you hadn't posted them on the grades page of
your website. I didn't see any comments on the evaluation sheets, other than
the star on the Take-Home Self-Evaluation Form (which was the only form with
an instructor adjustment). I'm not sure how to interperet all of that. Did
you agree with my self-evaluation? Do you need me to do something in order
for you to grade me on those sections? A:
I mentioned the following at the beginning of Unit C1. When I recognize
substantial similarily (near isomorphism) in multiple comprehensive exercises,
I leave the adjustment area blank (does not mean that I agreed with your
self-evaluation) and invite you to make an appointment
and discuss your understanding invidually with me (see an earlier announcement
and syllabus about my position). I will adjust your scores at that
point. I did not write comments on your exercises because I really
want to discuss "your" understanding of what you wrote. To get your
scores (adjusted), you will need to make an appointment just like upgrading
your scores. [10/29/03]
- Q: For the comprehensive exercise (question 2, Crime Scene),
is part D/E in reference to the CrimeScene structure you provided, with "Objects,
Cats, People", or can we refer to the logical statements at the beginning
of the question as well? A: All the questions in Part 1 (A through E)
refer to the same logic-structure connection, i.e., the connection between
the logical statements in "Information" and the specified structure "CrimeScene."
The structure CrimeScene can only be understood as the smallest structure
that is specified by Information. So, when you do Questions D and E,
you naturally refer to Information as the logic that still specifies CrimeScene. [10/15/03]
- Q: I am a little confused about the requirements of the
mini-project. I understand that we have to pick a real world phenomenon
and model it, but are we to model it formally using structures, or informally
like in module A. I read the page posted about the project, but I am
still unclear what exactly you mean by "describe" at this point.. A: For
Phase 1, you only need to write in plain English what object/phenomena you
will be modeling and where you see the logic-structure connection. There
is no need to do this formally. That is the focus of Phase 2 (by the
end of Module C). As I mentioned in class, one or two paragraphs may
be sufficient (although I do not specify min/max length). In addition,
you can show me your mini project or send it to be by e-mail if you want
feedback. [10/14/03]
- Q: My big question is on proof with contradition and contrapositive. A: Here, I will focus on proof by contradiction. First, if
you want to go over proofs, see the textbook Section 1.1 (remember that the
text is on reserve in the library). This proof technique is used widely
in Math, esp. for proving negative results or when direct proof is not obvious.
As an example, let us prove that the square root of 2 is not a rational
number. To use "proof by contradition," we hypothesize the contrary
to our desired conclusion (in the hope that it will eventually be rejected).
That is, we hypothesize that the square root of 2 is a rational number.
Then, there must be some natural numbers a and b such that a/b is the square root of 2, where b is not 0. Squaring both sides, we obtain that a2/b2
= 2. At this point, we list all the squares of natural numbers: 1,
4, 9, 16, 25, .... No two squares have the ratio 2. So, a2/b2 = 2 is actually impossible. Thus, the hypothesis that the square root of 2 is not a rational number must be wrong. Then, the opposite (the square root of 2 is not a rational number)
must be correct. Try to see this against the example we discussed in
class. You should find that the proof pattern shows the reasoning clearly.
[10/8/03]
- Q: For B3 Exercise 3: Board Game, question B, it states,
"Do not refer to any of the conditions" ...I am not sure how to define an
input and output if I cannot refer to the conditions. A: You define the function using the list notation, not the predicate notation (in the latter, you can use the conditions/rules, which is not called for in this problem). [10/2/03]
- Q: I was just wondering if we are suppose to write out answers for the Module A Performance Goals? A: In
your eval form, explain how you achieved those learning goals. To do
it, you should use your experience with (and answers to) Comprehensive Exercises.
As I said in class, doing exercises is just a means to achieve learning
goals. So, this kind of self-evaluation must be taking place at a level
higher than just doing exercises (called meta-level). If you reflect things at a meta-level, you may be able to see things beyond what you would normally see. [9/15/03]
- Q: (Module A Comprehensive Exercise) Question 3A says to list good and bad comments. Would a
bad comment be a poorly done comment, or one that doesn't work?
Because if it is just poorly worded, all of the comments will still compile in Question 3B.
Or do you mean like /* Hello */ world /*this */is
/*end of c*/omment */ as something that works but isn't good, or like /* this is
an int int x = 0 */ where code is there and comment is wrong? What do you mean
exactly? A:
First, a few general remarks. This is a problem about "logic-structure
connection." You must think whether the specification given in the
problem correctly capture all the scenarios that correspond to our intuition.
More specifically, when we say "all of the characters between /* and */ are ignored," do we really want all of the (possible) characters? If so, what can there be between /* and */?
Would certain cases change what you intend? For example, examine
one of your examples carefully. Did you intend that the entire section
of "/*this */is
/*end of c*/omment */" be commented out?
Would Java/C++ compilers interpret the same way? In response
to Question 3A, "good" examples are those that would be consistent with the
given specification. "Bad" ones are the rest. In response to
Question 3B, you will test each one of them whether they are actually interpreted
as comments by Java/C++ compilers. If exactly the "good" examples that
you listed (and not the "bad" ones) are correctly commented out by the compiler,
you can conclude that the given specification is appropriate. If not,
you have to think what is going on. Again, this is a problem of analyzing
the connection between logic (i.e., logical statements, specification, etc.)
and structures (i.e., scenarios, cases, representations, etc.). Review
the learning goals and identify which one of the learning goals you see in
this problem. This is probably an ill-defined problem. However,
the developers of programming languages went through stages very similar
to what you are experiencing in this problem. I believe that skills
for analyzing and responding to a problem like this is what you will need
when you tackle real-life problems. [9/15/03]
- Q: For Exercise A2-2, Question 4, I was wondering what
you define "boundary" as? Because, I would think that if an island
had a lake, wouldn't that island be the lake's boundary? I was just a little
confused on this problem. A: Technically, the
boundary of a lake would be the extent where the water exists. The
existence of rivers going into/out of a lake can introduce complication.
However, you should focus on the question, i.e., which (among set,
relation, and function) would be the most appropriate way to represent such
lakes. Then, it won't be that important to understand the precise meaning
of that kind of (mysterious) lakes. Recall, for example, the set of
Santa Clauses; most adults' understanding is that Santa Clause is virtual
(or abstract). We can freely think of sets of abstract things, relations
among abstract things, etc. [9/7/03]
- [Not a technical question; Not a course topic either, but ...] Q: What is your favorite TV show? A: It's "NOW" on PBS. I highly recommend it to all of you. [9/4/03]
<End>