Posts

Showing posts from February, 2011

UNINFORMED SEARCH

UNINFORMED SEARCH: There are two uniformed search:- 1. Breath First Search 2. Depth First Search SEARCH TREE:- - Root Node - Leaf Node - Ancestor / Descendant - Branching factor - Complete Path / Partial Path. EVALUATING SEARCH STRATEGIES:- 1. Completeness:  is the strategy guaranteed to find a solution if one exists. 2. Optimality:  if the solution is found, is the solution guaranteed to have the minimum cost. 3. Time Complexity:  Time taken (number of node expanded worst or average case) to find a solution. 4. Space Complexity:  Space used by the algorithm measured in term of the maximum size of list. BREADTH SEARCH:- Function breadth(){ queue = []; state = root - node; while(true) { if is_goal(state)            then return success else add_to_back_of_queue(Sucessor(state)); if queue = []            then repeat failure; state = queue[0] remove_first_...

Employees Program

Image
EMPLOYEES PROGRAM:- ( Copy/Paste to notepad and save in java bin directory with name testtemp.java ) class employees { private String Name; private Integer empno,basicpay,hr,ma,ca,it,gs,ns; public void setdata(Integer E, String N, Integer B, Integer H, Integer M, Integer C, Integer I) { empno = E; Name = N; basicpay = B; hr = H; ma = M; ca = C; it = I; } private String gen_sal() { Integer thr,tma,tca,tit; String s; thr = basicpay * hr / 100; tma = basicpay * ma / 100; tca = basicpay * ca / 100; tit = basicpay * it / 100; gs = basicpay+thr+tma+tca; ns = gs-tit; s = "\nHouse Rent \t\t= "+hr+" % \t= "+thr; s += "\nMedical Allowance \t= "+ma+" % \t= "+tma; s += "\nConvience Allowance \t= "+ca+" % \t= "+tca; s += "\n----------------------------------------"; s += "\nGross Salary \t\t\t= "+gs; s += "\nIncome Tax Deduction \t= "+it+" % \t= -"+tit; s += "...