Give an algorithm for the following problem. Given a list of n distinct positive integers, partition the list into two sublists, each of size n/2, such that the difference between the sums of the integers in the two sublists is minimized. You may assume that n is a multiple of 2.

Consider the following algorithm, where the array A is indexed 1 through n:
int add_them ( int n , int A[ ] ) {
index i , j , k ;
j = 0 ;
for ( i = 1 ; i <= n ; i++)
j = j + A[i] ;
k = 1 ;
for ( i = 1 ; i <= n ; i++)
k = k + k ;
return j + k ;
}
(a) If n = 5 and the array A contains 2, 5, 3, 7, and 8, what is returned?
(b) What is the time complexity T(n) of the algorithm?

Consider the following algorithm:
for ( i = 2 ; i <= n ; i++) {
for ( j = 0 ; j <= n) {
cout << i << j ;
j = j + floor(n/4) ;
}
}
(a) What is the output when n = 4
(b) What is the time complexity T(n). You may assume that n is divisible 4.

Consider the following algorithm:
j = 1 ;
while ( j <= n/2) {
i = 1 ;
while ( i <= j ) {
cout << j << i ;
i++;
}
j++;
}
(a) What is the output when n = 6, n = 8, and n = 10?
(b) What is the time complexity T(n)? You may assume that the input n is divisible by 2.

1. Consider the following algorithm:
for ( i = 1 ; i <= 1 . 5 n ; i++)
cout << i ;
for ( i = n ; i >= 1 ; i - - )
cout << i ;
(a) What is the output when n = 2, n = 4, and n = 6?
(b) What is the time complexity T(n)? You may assume that the input n is divisible by 2.

Fuzzy logic is extension of Crisp set with an extension of handling the concept of Partial Truth.
a) True
b) False

45

What is used for tracking uncertain events?
a) Filtering algorithm
b) Sensors
c) Actuators
d) None of the mentioned

68

Rational agent is the one who always does the right thing. State true or false
a) True
b) False

42

One of the main cons of hill-climbing search is,
a) Terminates at local optimum
b) Terminates at global optimum
c) Does not find optimum solution
d) Fail to find a solution

41

What is the other name of informed search strategy?
a) Simple search
b) Heuristic search
c) Online search
d) None of the mentioned

37

What can operate over the joint state space?
a) Decision-making algorithm
b) Learning algorithm
c) Complex algorithm
d) Both a & b

48

In which state spaces does the online-dfs-agent will work?
a) Irreversible state spaces
b) Reversible state spaces
c) searchable state spaces
d) All of the mentioned

53

What is the action of task environment in artificial intelligence?
a) Problem
b) Solution
c) Agent

53

hi this is rahul i have 4 yrs ep in testing and iam working
one mnc .i looking for change but my qualification is bsc
computers its correspondane course. in which they will
accept this type of courses plz let me know

979

What is the minimum time for any program scan in pc

32

what is software cycle?give a diagramatic representation

1284

perform para-a,is true?it's perform or not?

918

What is meant by simulated annealing in artifical intelligence?
a) Returns an optimal solution when there is a proper cooling schedule
b) Returns an optimal solution when there is no proper cooling schedule
c) It will not return an optimal solution when there is a proper cooling
schedule
d) None of the mentioned

45

The problem-solving agent with several immediate options of unknown value can decide what to do by just examining different possible sequences of actions that lead to states of known value, and then choosing the best sequence. This process of looking for such a sequence is called Search. State True or False
a) True
b) False

42

Hill-Climbing algorithm terminates when,
a) Stopping criterion met
b) Global Min/Max is achieved
c) No neighbor has higher value
d) Local Min/Max is achieved