Posts

Write a menu driven program to sort the array in ascending/descending order using a) Quick sort b) Merge sort

#include #include #include #include class sort {             int a[30], i, j, k, n;             public:                         int mergesort(int a[], int low, int high);                         int simplemerge(int a[], int low, int mid, int high);                         int partition(int a[], int low, int high);                         int quicksort(int a[], int low, int high); }; int sort::me...

Write a menu driven program to implement linear and binary search also find the location of its first occurrence

#include #include #include #include int i, k, m, n, item; class search {             int a[' '];             public:                         int sort(int a[], int n);                         int bsearch(int a[], int n, int item);                         int lsearch(int a[], int n, int item); }; int search::sort(int a[], int n) {             int i, j, temp;             for (i=0 ;i  ...

AUGMENTED TRANSITION NETWORKS

AUGMENTED TRANSITION NETWORKS ============================= Introduction ------------ Augmented Transition Networks (ATNs) were originally used for syntactic parsing of Natural Language (NL), but they have the power of a Universal Turing Machine, and so can be used for other purposes too. An example of their use is in the expert system ATTENDING developed by P.L. Miller for critiquing an anaesthetist's patient management plan. Here, the use of ATNs in parsing English is examined. ATNs stand out somewhat from the rest of the course, and this topic could be omitted entirely were it not for the fact that ATNs are so often used as an AI technique. It should be noted, however, that there are other techniques for parsing NL. prasenraj.blogspot.in An ATN is a directed graph, consisting of nodes and arcs. The nodes represent states in the parse; each arc contains a test which must succeed for the arc to be traversed. If the arc is trave...

MEANS - ENDS ANALYSIS

MEANS - ENDS ANALYSIS:- Most of the search strategies either reason forward of backward however, often a mixture o the two directions is appropriate. Such mixed strategy would make it possible to solve the major parts of problem first and solve the smaller problems the arise when combining them together. Such a technique is called "Means - Ends Analysis". The means -ends analysis process centers around finding the difference between current state and goal state. The problem space of means - ends analysis has an initial state and one or more goal state, a set of operate with a set of preconditions their application and difference functions that computes the difference between two state a(i) and s(j). A problem is solved using means - ends analysis by 1. Computing the current state s1 to a goal state s2 and computing their difference D12. 2. Satisfy the preconditions for some recommended operator op is selected, then to reduce the difference D12. 3. The operator OP ...