Normalize it to 5th normal from - database

[This questions is obviously a homework question. I can't understand my professor and have no idea what he said during the election. I need to make step by step instructions to normalize the following table first into 1NF, then 2NF,3NF AND 4TH NF AND 5TH NF][1]
[1]: https://i.stack.imgur.com/lzlz9.jpg

Related

Looping and selectig different value in each line

I have a problem that I think would be solved relatively quickly with a loop. I have to work with SPSS and I think it can only be solved in syntax.
Unfortunately I am not good with loops, so I hope that one of you can help me.
I have done a study on reasons for abortions. Now I would like to present the distribution of reasons.
The problem is that each person was first asked about all their pregnancies (because this is also relevant for the later analysis), then the pregnancy was determined to which the questionnaire will further refer.
So the further questionnaire was only about one of the pregnancies, whereas the first questions (f.ex. year of pregnancy, reason for abortion) were answered for each pregnancy. For the reasons I only need the information that refers to the pregnancy that was also used for the further questionnaire.
I have an index variable that determines the loop at which pass the relevant pregnancy is asked ("index"). Then I have the variable "Loop_1_R" to "Loop_5_R" which queries the reasons for each up to 5 abortions (of course, for each woman, only the number of pregnancies that she also indicated). In between there are some missing data, for ex. it could be that a woman said that she had 5 pregnancies, but only two of them were abortions (f.ex. the third and fifth). So then she would only give reasons for an abortion in loop3 and loop5.
Now I want to create a new variable which contains only the reason which refers to the relevant pregnancy. So for each woman only one value. I was thinking, you could build a loop in the sense of calculate new variable in such a way that loop i is taken at index i.
I could of course do it by hand, but with a VPN count of over 3000 it will obviously take considerably longer.
I hope someone can help me! This is an example dataset with less loops and VPN:
You can use do repeat to loop and catch the value you need this way:
do repeat vr=Loop_1_R to Loop_5_R/vl=1 to 5.
if Index=vl reason=vr.
end repeat.

Can a language have a multiple solution in dfa diagram?

What i mean is that can there be multiple different forms of diagram of the same language? Can it be drawn with multiple solutions? Or each language has only one solution in DFA? I attended a pop quiz today. Drew a solution and tried multiple strings. Each of those were accepted but i didn't get any points for it. Didn't get any feedback from my TA as why it was considered wrong.
The question was. Let L = {w | w contains an odd number of 0s or at least two 1s}.
This is what i did (sorry had to use ms paint).
If you notice a bit more carefully then 0101 is a string in your language but it is not accepted by your automata. Also to answer your other question, yes, there can be multiple DFAs which accept the same language. A trivial example would be the language 0* (Think about it if you are still interested, haha!).
P.S. - Just noticed a comment which pointed out the counter-example but I still went ahead. Sorry!

Double line coming from an Entity

My Data base professor uses this for the Conceptual design:
(I had to fix the words cause it wasn't in English, sorry)
Due to a few personal reasons I couldn't watch his classes, and the book I'm using won't tell me why Teacher has this double line connection with Teaches.
It is all over the place on the notes of his, and I can't study properly like this.
Does anyone care to explain it to me?
This double line says that a teacher must teach at least 1 subject. Double line shows the full participation and single line shows partial participation and it is also known as minimum cardinality.

Inference logic rule selection problem

Tommy, jill and travelor belong to the Sc club.Every member of sc club is either a surfer or a bike rider or both.No bike rider likes a rainy day and all the surfers like a sunny day.Jill like whatever Tommy likes and likes whatever tommy dislikes.Tommy likes a rainy day and a sunny day.
I want to represent the above information in first order predicate logic in such a way that I can represent the question " who is a member of SC club who is a bike rider but not a surfer?" as a predicate logic expression.
What first order inference rule I should pick- forward chaining, backward chaining, or resolution refutation.??
First off this question sounds like it is being asked directly out of a book. If that is the case, it might help if you reference the book in your question. If you are truly stuck after trying to work it out, then ask yourself this...
How does each inference rule work, and what purpose does it serve toward finding solutions in first order logic problems? Once you know that, either...
you wont understand it, but you will have a better question to ask about a particular technique
the obvious answer will jump out at you
you will realize which of those techniques can work for your problem and just choose one
Showing that you have taken some time to try and figure out the problem before posting a book style question on stackoverflow will make other people more likely to help you. You will also have questions that show your lack of conceptual understanding, which is a very good reason to post a question here, as opposed to "answer my homework" sounding questions such as this.

What's the difference between sound and unsound reasoning?

In terms of Artificial Intelligent and Logic Knowledge, What is the difference between sound and unsound reasoning?
Also, what kind of search Does ID3 algorithm use? Is it Breadth-first search?
Thanks
Reasoning is sound if the premises are true and the conclusion can be drawn from just those premises. For example:
An answer upvote gets you 10 rep
Jack has 4 answer upvotes
Jack has 40 rep
is sound (ignoring other rep factors :) ). If it read:
An answer upvote gets you 50 rep
Jack has 4 answer upvotes
Jack has 200 rep
the reasoning would be valid, but not sound, because one of the premises is false
Two questions, not closely related. I answer only the first - do start a new SO question for the second.
There are two meanings of sound in logic. The first, which is prevalent in philosophy, is the one Michael gave. The second —which is generally used in formal logic, by logicians influenced by the terminology of model theory— is that sound inferences are truth-preserving, i.e., whenever the premises are true, so is the conclusion, or in other words, the premises imply the conclusion.
Note that the first is more demanding than the second: on the first account the premises of sound arguments need to be true, whilst on the second they do not. So all reasoning that is account-#1 sound are account-#2 sound, but not vice-versa, and Michael's post explains why: the first of his examples is sound according to both criteria, whilst the second is sound only according to the second.
I think that in AI the second definition is more prevalent, but seeing as how AI is such a diverse discipline, with heavy influences from philosophy, you might well encounter the first. When I taught AI, I used the second.
I don't know where the first definition came from, but the second is from Tarski. People who use the first definition of soundness use the term valid to talk about truth-preserving arguments. See the Internet Encyclopedia of Philosophy on Validity and Soundness for a discussion of the first definition, and Wikipedia's article on Soundness for an explanation of the second.
A logic consists of a set of proposition and inference rules on these.
Given a logic L every proposition p that can be derived by the successive application of inference rules is said to be sound.
Any proposition p that cannot be derived can be said to be unsound, but no one says that. We just say that it is not in L.
A logic L is complete if every statement p that you (as an intelligent human) think should be true is sound.
Thus, we seek sound and complete logics.
This question sounds like a homework question for AI 101.

Resources