Saturday, October 27, 2007

Algorithms Interview Question Part 3


18. The algorithms that test for a solution, if one is found the algorithm is solved, if not it recurs once and tests again, continuing until a solution is found is (practice test question)
a. Dynamic Programming Algorithms
b. Branch and Bound Algorithms
c. Simple Recursive Algorithms
d. Backtracking Algorithms
Ans:d
The class of algorithms that remembers older results and attempts to use this to speed the process of finding new results is called dynamic programming algorithm.
The algorithms that form a tree of subproblems to the primary problem, following each branch until it is either solved or lumped in with another branch is called branch and bound algorithm.
This type of algorithm goes for a direct solution first, then backtracks to find a simpler solution is called simple recursive algorithm.
The algorithms that test for a solution, if one is found the algorithm is solved, if not it recurs once and tests again, continuing until a solution is found is called backtracking algorithm.


19. An algorithm that is similar to a branch and bound algorithm, except that it uses the backtracking method of recurring in tandem with dividing a problem into subproblems.
(practice test question)
a. Dynamic Programming Algorithms
b. Divide and Conquer Algorithms
c. Simple Recursive Algorithms
d. Backtracking Algorithms
Ans:b
The class of algorithms that remembers older results and attempts to use this to speed the process of finding new results is called dynamic programming algorithm.
This type of algorithm goes for a direct solution first, then backtracks to find a simpler solution is called simple recursive algorithm.


20. Any algorithm that works for all practical purposes but has a theoretical chance of being wrong. (practice test question)
a.Probabilistic algorithm
b.Randomized algorithm
c.Deterministic algorithm
d.Non deterministic algorithm
Ans:a
Any algorithm that makes some random (or pseudorandom) choices is called randomized algorithm.
An algorithm whose behavior can be completely predicted from the input is called deterministic algorithm.
A conceptual algorithm with more than one allowed step at certain times and which always takes the right or best step. It has the super computational characteristic of choosing the optimal behavior is called non-deterministic algorithm.
21. Any algorithm that makes some random (or pseudorandom) choices
(practice test question)
a.Probabilistic algorithm
b.Randomized algorithm
c.Deterministic algorithm
d.Non deterministic algorithm
Ans:b
Any algorithm that works for all practical purposes but has a theoretical chance of being wrong is called probabilistic algorithm.
An algorithm whose behavior can be completely predicted from the input is called deterministic algorithm.
A conceptual algorithm with more than one allowed step at certain times and which always takes the right or best step. It has the super computational characteristic of choosing the optimal behavior is called non-deterministic algorithm

1 comments:

Unknown on November 23, 2009 at 8:06 PM said...

you have a nice site. thanks for sharing this site. you can download lots of ebook from here

http://feboook.blogspot.com

Advertisement

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com