(Short Answers) 1.What is the difference between optimal reasoning and human rea
ID: 3770984 • Letter: #
Question
(Short Answers)
1.What is the difference between optimal reasoning and human reasoning?
2. Define the concepts of completeness, optimality, time complexity, and space complexity as they relate to heuristics?
3. Give an example of an ordering of accesses among concurrent activities (e.g., a program with a data race) that is not sequentially consistent.
4.Parallel programming involves trading off the complexity of distributing computation and the overhead of communications for the ability to perform multiple computations at once. Describe a case where it may be possible but undesirable to parallelize a serial program.
Explanation / Answer
Experimental cognitive psychologists carry out research on reasoning behaviour. Such research may focus, for example, on how people perform on tests of reasoning such as intelligence or IQ tests
Example of Race condition
public class Example extends Thread {
private static int cnt = 0; // shared state
public void run() {
int y = cnt;
cnt = y + 1;
}
public static void main(String args[]) {
Thread t1 = new Example();
Thread t2 = new Example();
t1.start();
t2.start();
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.