Download cs344-midsem-with-sol

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Type-2 fuzzy sets and systems wikipedia , lookup

Intelligence explosion wikipedia , lookup

Fuzzy concept wikipedia , lookup

Existential risk from artificial general intelligence wikipedia , lookup

History of artificial intelligence wikipedia , lookup

Ethics of artificial intelligence wikipedia , lookup

Fuzzy logic wikipedia , lookup

Philosophy of artificial intelligence wikipedia , lookup

Transcript
CS344
Introduction to Artificial Intelligence
20/02/13
Total Marks: 40
Midsem
11 AM-1PM
(Open notes exam; please be precise and brief)
Question 1
(a) In quiz 1, the well known Yager class of functions for defining union of two fuzzy
sets was given :
 AB ( x)  min[ 1, ( A ( x) w   B ( x) w )1/ w ]
where w is a real valued parameter in the open interval (0,∞). In consistency with this
expression, give expressions for fuzzy complementation and fuzzy intersection? The
expressions MUST involve w as parameter. By consistency we mean rules of
commutativity, associativity and De Morgan should hold. You have to show that these
rules indeed hold.
[Marking scheme: 3 for finding the complementation expression and 4 for intersection.
Then 2 for proving commutativity, 3 for associativity and 5 for De morgan]
(17)
Ans.:
i)
Complementation:
 A ( x)  (1   A ( x)w )1/ w
c
ii)
iii)
iv)
Intersection (see below for another possibility):
 A B ( x)  1  min(1, ((1   A ( x)) w  (1   B ( x)) w )1/ w )
Commutativity :
Evident from the commutativity of addition
Associativity:
Let  A ( x)  a, B ( x)  b, and C ( x)  c.
 A( BC ) ( x)  1  min[1, ((1  a) w  (1   BC ( x)) w )1/ w ] ...( )
Where,  BC ( x)  1  min[1, ((1  b) w  (1  c) w )1/ w ]
= 1  (min[1, (1  b) w  (1  c) w ])1/ w
Putting this value of  B C ( x) in  , we get:
 A( B C ) ( x)  1  min[1, ((1  a) w  (min[1, (1  b) w  (1  c) w ]))1/ w ]
= 1  min[1, (min[1  (1  a) w , (1  a ) w  (1  b) w  (1  c) w ])1/ w ]
Note that 1  (1  a) w will always be greater than 1, hence:
 A( B C ) ( x)  1  min[1, ((1  a) w  (1  b) w  (1  c) w )1/ w ]]....(  )
Rotating  cyclically, we get:
C ( A B ) ( x)  1  min[1, ((1  c) w  (1  b) w  (1  a) w )1/ w ]]....( )
Hence  A( B C ) ( x)  ( A B )C ( x) ....(from  and  )
v)
De Morgan’s laws :
( A B )C ( x)  1  (1  min[1, ((1  a) w  (1  b) w )1/ w ])
= min[1, ((1  a) w  (1  b) w )1/ w ] ....( )
A
C
 BC
( x)  min[1, ((1  a ) w  (1  b) w )1/ w ] ....( )
 ( A B )C ( x)   AC  BC ( x) .... (from  and  )
Similarly other law can be proved:
( A B ) ( x)  1  (min[1, (a w  b w )1/ w ])
....( )
C
A
C
 BC
( x)  1  min[1, ((1  (1  a)) w  (1  (1  b)) w )1/ w ....( )
 1  min[1, ( a w  b w )1/ w ]
 ( A B )C ( x)   AC  BC ( x) .... (from  and  )
 There is one more equation possible for intersection
 A B ( x)  max(0,  A ( x) w   B ( x) w )1/ w
Let us prove associativity and De Morgan’s law for this form.
i.
Associativity :
 A( B C ) ( x)  max(0, a w  max(0, b w  c w  1)  1)1/ w
= max(0, max(a w  1, a w  b w  c w  2))1/ w
= max(0,a w  b w  c w  2)1/ w
a w  1  1 ....( )
( A B )C ( x)  max(0, max(0, a w  b w  1)  c w  1)1/ w
= max(0,max(c w  1, a w  b w  c w  2))1/ w
= max(0,a w  b w  c w  2)1/ w
c w  1  1 ....( )
  A( B C ) ( x)  ( A B )C ( x) .... (from  and  )
ii.
De Morgan’s laws :
Law 1:
( A B ) ( x)  (1  min(1, a w  b w ))1/ w
c
= max(0,1  a w  b w )1/ w ....( )
 A  B ( x)  max(0, (1  a w )  (1  b w )  1)1/ w
c
c
= max(0,1  a w  b w )1/ w ....( )
 ( A B )c ( x)   Ac  Bc ( x) ....(from  and  )
Law 2:
( A B ) ( x)  (1  max(0, a w  b w  1))1/ w
c
= min(1, 2  a w  b w )1/ w ....( )
 A  B ( x)  min(1,1  a w  1  b w )1/ w
c
c
= min(1, 2  a w  b w )1/ w ....( )
 ( A B )c ( x)   Ac  Bc ( x) ....(from  and  )
(b) The P@K value for “ranking in IR” corresponding to a query Q and retrieved
documents D1, D2, D3,…, DN is calculated as follows. Go down the list upto the Kth
document, i.e., D1, D2, D3,…, DK and then mark each Di as 1/0 according to whether Di is
relevant or irrelevant to the query. Then P@K=R/K, where R is the number of relevant
documents in the set { D1, D2, D3,…, DK }.
Propose a fuzzy P@K value. What is/are the linguistic variable/variables in this case?
How will their profiles be defined?
[marking scheme: 1 for LV(s), 3 for discussing and fixing the profiles, 2 for defining and
justifying fuzzy P@K.]
(6)
Ans.:
LV(s)
-------- 1 Mark
Relevance of the document is a linguistic variable in this case
Discussion and fixing the profile
 Shape of the profile? What are the axes? Why?
------- 3 Marks

o E.g., a profile can have fraction of overlapping query words with the
document content on the x axis and corresponding relevance value on the y
axis
Proper numerical quantities should be described for the profile
Defining and justifying fuzzy
------- 2 Marks
 Defining the formulae for fuzzy P@K
 Justification for the formulae e.g., numerator for the fuzzy P@K value could be
the sum of membership values for K documents (based on relevance profile)
because cardinality of a fuzzy set is the sum of membership values of the
respective elements in the set
Question 2
(a) Write a Prolog program to to bring an input English sentence ‘close’ to Indianlanguage/Japanese. This means, (i) drop the articles ; IL/Jap do not have them ; e.g., ‘the
children’ ‘children’ (corresponding to ‘bacchoM’ in Hindi), (ii) convert prepositions
to postpositions ; e.g., ‘in Mumbai’ ‘Mumbai in’ (for ‘mumbai me’ in Hindi) and (iii)
take the verb to the end ; e.g., ‘visited in Mumbai’  ‘Mumbai in visited’ (corresponding
to ‘mumbai me dekhaa’). Thus
The children visited the zoo in Mumbai  children zoo mumbai in visited
The sentence will be input as a list of comma separated 2-element lists, where each 2element list is the word and its part of speech. For example, the above sentence will be
input as
[[the, a], [children,n], [visited,v], [the,a], [zoo,n],[ in,p],[Mumbai,n]]
and the output will be
[children, zoo, mumbai, in, visited]
Limit your answer to take care of only the 3 above operations.
[Marking scheme: the program given by you should be a Prolog program, that is, follow
logic programming style. Recursion should be used liberally with appropriate boundary
conditions. 2 for setting up the main computation, 2 for dropping ‘the’, 3 for
prepositionpostposition and 3 for verb movement]
(10)
Ans.:
align(X,Y):-droparticle(X,A),changepos(A,B),changeverb(B,Y).
droparticle([],[]).
droparticle([H|Tail],Y):- member('a',H), droparticle(Tail,Y),!.
droparticle([H|Tail],[H|Y]):- droparticle(Tail,Y).
changepos([],[]).
changepos([X],[X]).
changepos([H1,H2|Tail],[H2,H1|Y]):- member('p',H1),
changepos(Tail,Y),!.
changepos([H1,H2|Tail],[H1|Y]):- changepos([H2|Tail],Y).
changeverb([],[]).
changeverb([H1|Tail],Y):member('v',H1),changeverb(Tail,X),add2end(H1,X,Y),!.
changeverb([H1|Tail],[H1|Y]):- changeverb(Tail,Y).
add2end(X,[H|T],[H|NewT]):-add2end(X,T,NewT).
add2end(X,[],[X]).
member(X,[X|_]).
member(X,[_|Rest]):-member(X,Rest).
(b) “Artificial Intelligence meets natural stupidity”. Take a stand with respect to this
famous statement made in 1977 by the famous AI theorist and technologist Drew
McDermott and write a one page (strictly ONE page) essay pertaining to the statement.
[Marking scheme: your imagination, breadth of reading and depth of understanding are
involved. The examiner’s decision is final, though.]
(7)
In the above statement, natural stupidity actually means the ‘stupidity of the AI
programmers’.
Some of the interpretations by students:
1. Machines intelligent at "tough" problems (e.g., chess), stupid at natural, day-today tasks.
2. Machine's limitations coming from human stupidity.
3. **Representation** in the machine is stupid; the programmer has to descend too
low
4. AI programs need to be stupid (to pass the Turing Test)
5. AI programs NECESSARILY will have stupidity
6. The s/w is intelligent, though the h/w is stupid
7. The level of AI machines now is that of NS humans!
8. Stupidity equated with lack of consistency.
9. Natural stupidity is in attempting to create machines that might one day prove to
be Frankensteins!
10. As AI reaches human level performance, it will perforce mimic its creator's
stupidity too.
11. To learn the program must be stupid (ignorant) before
12. The current state of AI=NS
13. Fine line between intelligence and stupidity!
14. However much the intelligence in an AI system, some human will find a stupid
way to ruin its performance.
15. AI should try to model stupidity too (Turing test)!
16. Too much of automation causing lack of mental faculty, i.e., stupidity.
17. It is stupid for humans to replicate on machines what they can do effortlessly (the
day-to-day tasks).
18. AI should augment human intellect, i.e., reduce natural stupidity.
19. Natural stupidity equated with unpredictability of human nature.
==paper ends==========