Welcome To baselogics.blogspot.in

Welcome to baselogics.blogspot.com

Place to Learn Programmes.

Bits and Bytes....

Computer Scientists Love Their Algorithms and Data Structures

Explore all new Mathematical Puzzles......

Jasper Roberts - Blog

Wednesday, December 31, 2014

Having Trouble With Mozilla Firefox on Windows............... Here's solution

Mozilla Firefox, Speed it up!

Speed up Mozilla FireFox

--------------------------------------------------------------------------------

1. Type "about :config" in the adress field.
2. Set the value of network.http.pipelining to "true".
3. Set the value of network.http.pipelining.maxrequests to "100".
4. Set the value of network.http.proxy.pipelining to "true"
5. Set the value of nglayout.initialpaint.delay to "0" (not availible in newer versions) 

Sunday, September 28, 2014

Linux, The Powerful Optimized Operating System......................

Do you Know How Linux is Built ?
Knowingly or unknowingly , You use linux .
Developers across the world submit their source code and Get Paid if selected For linux.
You Wait for year to see new Windows or ios but , New Linux  Kernel is Produced Every 3 months.
 Isn't this sounds really Great ?    Presently the Progress rate of linux is Simply Unmatched.
The Most Successful Open source Software Company is Ready To the World of Computing....
 Want to make most of your old low configuration PC ? Surely the only way to do this is installing Linux Operating System.
Nowadays the android phone which are beating the market of windows or java which is outdated now uses Linux Source Code to perform Faster >>>>>>>>>>>>>>>>>>>>>>
       source: Linux Foundation, YouTube

Tuesday, September 23, 2014

How to use laptop Wi-Fi to connect to internet for Hacking hotspot via kali linux or on any other os.............

 Hello friends!!!!!
This Post is Related to Problem with vmware for connecting over Wi-Fi connection For Hacking or Surfing purpose........

Because We Know that
follow the simple steps:

1. open networks and sharing settings
2. ensure WiFi is connected in physical os
3. click on WiFi adapter
4. then click on properties
5. then go to sharing tab
6. click on share this connection through host
7. here you have to select the default ethernet
   connection.(name may be different depending
   on your OS) mine is simply ethernet
8. now go to vmware
9. open settings under VM tab
10.now click on networks adapter
11.on R.H.S. network connection should be on
    NAT:used to share host IP.
12.click ok and enjoy surfing with wifi in
   VMWARE OS.  

Very IMP :Don't Forget to restore sharing settings on wi-fi properties to default when  you  done using with the wifi in vmware.

In the same way you can do it to any os simply go to os
and check as NAT Connection.

You Can Also follow it by simple video.
Don't forget to enter proxy for connecting to internet in Virtual Machine. 



Wednesday, September 10, 2014

Data Structures and Programming

In algorithmic problem solving, we deal with objects.  Objects are data manipulated by the algorithm.  To a cook, the objects are the various types of vegetables, meat and sauce.  In algorithms, the data are numbers, words, lists, files, and so on.  In solving a geometry problem, the data can be the length of a rectangle, the area of a circle, etc.  Algorithm provides the logic; data provide the values.  They go hand in hand.  Hence, we have this great truth:
Program = Algorithm + Data Structures
 Data structures refer to the types of data used and how the data are organised in the program.  Data come in different forms and types.  Most programming languages provides simple data types such as integers, real numbers and characters, and more complex data structures such as arrays, records and files which are collections of data.  Because algorithm manipulates data, we need to store the data objects into variables, and give these variables names for reference.  For example, in mathematics, we call the area of a circle A, and express A in terms of the radius r.  (In programming, we would use more telling variable names such as area and radius instead of A and r in general, for the sake of readability.)  When the program is run, each variable occupies some memory location(s), whose size depends on the data type of the variable, to hold its value. 

Sunday, September 7, 2014

Tutorial on How to Create Simple Website using html for the beginners.................

This tutorial is made keeping the state of beginner to be zero knowledge about the html language....................

Get the list with syntax of html tags on http;\\w3schools.com\

Saturday, September 6, 2014

Fibbonacci series Algorithm with Flowchart

              We all know fibbonacci sequence (for eg 1,1,2,3,5,8,13,....  sequence in which next no is addition of previous 2 fibonacci numbers) so we will try to write algorithm to generate fibbonacci sequence . 
F1=1st number, F2=2nd number -->F3=f1+f2=1+2=3 F4=f2+f3=2+3=5 F5=f3+f4=3+5=8, and so on. f1 f2 f3 f4 f5 f6 f7.............. 1 2 3 5 8 13 21............. 
In algorithm: 
1. Assign sum=0, A=0, B=1, i=1 
2. Get the no. of terms upto which u want to generate the Fibonacci no, i.e., n. 
3.Add A and B to get the next Fibonacci number 
4. Assign the value of B to A i.e. A=B 
5. Assign the value of sum to B i.e. B=sum 
6. Write the value of su to get next Fibonacci number in the series. 
7. increment i with 1 i.e. i=i+1 and repeat step 3,4,5,6 with the last value of i=n(n is the no. of terms which u wnt to generate Fibonacci no. series.) 
8. Stop
















Thursday, September 4, 2014

What Kinds of problems are solved by algorithm ?

Sorting is by no means the only computational problem for which algorithms have been developed. (You probably suspected as much when you saw the size of this book.) Practical applications of algorithms are ubiquitous and include the following examples:

  • The Human Genome Project has made great progress toward the goals of identifying all the 100,000 genes in human DNA, determining the sequences of the 3 billion chemical base pairs that make up human DNA, storing this information in databases, and developing tools for data analysis. Each of these steps requires sophisticated algorithms. Although the solutions to the various problems involved are beyond the scope of this book, many methods to solve these biological problems use ideas from several of the chapters in this book, thereby enabling scientists to accomplish tasks while using resources efficiently. The savings are in time, both human and machine, and in money, as more information can be extracted from laboratory techniques. 
  • The Internet enables people all around the world to quickly access and retrieve large amounts of information. With the aid of clever algorithms, sites on the Internet are able to manage and manipulate this large volume of data. Examples of problems that make essential use of algorithms include finding good routes on which the data will travel (techniques for solving such problems appear in,and using a search engine to quickly find pages on which particular information resides .  
  • Electronic commerce enables goods and services to be negotiated and ex- changed electronically, and it depends on the privacy of personal information such as credit card numbers, passwords, and bank statements. The core technologies used in electronic commerce include public-key cryptography and digital signatures (covered in Chapter 31), which are based on numerical algorithms and number theory.
  •  Manufacturing and other commercial enterprises often need to allocate scarce resources in the most beneficial way. An oil company may wish to know where to place its wells in order to maximize its expected profit. A political candidate may want to determine where to spend money buying campaign advertising in order to maximize the chances of winning an election. An airline may wish to assign crews to flights in the least expensive way possible, making sure that each flight is covered and that government regulations regarding crew scheduling are met. An Internet service provider may wish to determine where to place additional resources in order to serve its customers more effectively. All of these are examples of problems that can be solved using linear programming, which we shall study in Chapter 29. 
                                       Although some of the details of these examples are beyond the scope of this book, we do give underlying techniques that apply to these problems and problem areas. We also show how to solve many specific problems, including the following:
  • We are given a road map on which the distance between each pair of adjacent intersections is marked, and we wish to determine the shortest route from one intersection to another. The number of possible routes can be huge, even if we disallow routes that cross over themselves. How do we choose which of all possible routes is the shortest? Here, we model the road map (which is itself a model of the actual roads) as a graph (which we will meet in Part VI and Appendix B), and we wish to find the shortest path from one vertex to another in the graph. We shall see how to solve this problem efficiently in Chapter 24.
  •  We are given two ordered sequences of symbols, X =( x1,x 2,.....,xi) and Y=(  y1,y 2,.....,yi), and we wish to find a longest common sub sequence of X and Y. A sub sequence of X is just X with some (or possibly all or none) of its elements removed. For example, one sub sequence of  (A;B;C;D;E;F;G) would be B; C; E; G. The length of a longest common sub sequence of X and Y gives one measure of how similar these two sequences are. For example, if the two sequences are base pairs in DNA strands, then we might consider them similar if they have a long common sub sequence. If X has m symbols and Y has n symbols, then X and Y have 2 m and 2 n possible sub sequences,

What is an algorithm?

                An algorithm is a procedure followed to accomplish a specific task. An algorithm is the idea behind any reasonable computer program. To be interesting, an algorithm must solve a general, well-specified problem. An algorithmic problem is specified by describing the complete set of instances it must work on and of its output after running on one of these instances. This distinction, between a problem and an instance of a problem, is fundamental. For example, the algorithmic problem known as sorting is defined as follows:
Problem: Sorting
Input: A sequence of n keys a1,...,an.
Output: The permutation (reordering) of the input sequence such that a 1 ≤ a 2 ≤ ···≤a n−1 ≤ a n.
                 An instance of sorting might be an array of names, like {Mike, Bob, Sally, Jill,Jan }, or a list of numbers like {154, 245, 568, 324, 654, 324}. Determining that you are dealing with a general problem is your first step towards solving it. An algorithm is a procedure that takes any of the possible input instances and transforms it to the desired output. There are many different algorithms for solving the problem of sorting. For example, insertion sort is a method for sorting that starts with a single element (thus forming a trivially sorted list) and then incrementally inserts the remaining elements so that the list stays sorted.

source:algorithm design manual

Programming Puzzle Problem

Triangular Vertices

Consider the points on an infinite grid of equilateral triangles as shown 
below:
               x
              x x
             x x x
            x x x x
           x x x x x
               .
               .


Note that if we number the points from left to right and top to bottom, 
then groups of these points form the vertices of certain geometric shapes. For 
example, the sets of points {1,2,3} and {7,9,18} are the vertices of 
triangles, the sets {11,13,26,24} and {2,7,9,18} are the vertices of 
parallelograms, and the sets {4,5,9,13,12,7} and {8,10,17,21,32,34} are the 
vertices of hexagons.

Write a program which will repeatedly accept a set of points on this 
triangular grid, analyze it, and determine whether the points are the vertices 
of one of the following acceptable figures: triangle, parallelogram, or 
hexagon. In order for a figure to be acceptable, it must meet the following 
two conditions:
      1) Each side of the figure must coincide with an edge in the grid.
and   2) All sides of the figure must be of the same length.

Tuesday, September 2, 2014

Puzzle :5 men, a monkey and some coconuts

Five men crash-land their airplane on a deserted island in the South Pacific.  On their first day they gather as many coconuts as they can find into one big pile.  They decide that, since it is getting dark, they will wait until the next day to divide the coconuts.
That night each man took a turn watching for rescue searchers while the others slept.  The first watcher got bored so he decided to divide the coconuts into five equal piles.  When he did this, he found he had one remaining coconut.  He gave this coconut to a monkey, took one of the piles, and hid it for himself.  Then he jumbled up the four other piles into one big pile again.
To cut a long story short, each of the five men ended up doing exactly the same thing.  They each divided the coconuts into five equal piles and had one extra coconut left over, which they gave to the monkey.  They each took one of the five piles and hid those coconuts.  They each came back and jumbled up the remaining four piles into one big pile.
What is the smallest number of coconuts there could have been in the original pile?


Hint to puzzle : Five men, a monkey, and some coconuts

Let the original pile have n coconuts.  Let a be the number of coconuts in each of the five piles made by the first man, b the number of coconuts in each of the five piles made by the second man, and so on.
Write a Diophantine equation to represent the actions of each man.  Express n + 4 in terms of e + 1, and hence deduce the smallest possible value of n + 4.

Some Interesting Mathematical Puzzles.........


A rectangular sheet of paper is folded so that two diagonally opposite corners come together.  If the crease formed is the same length as the longer side of the sheet, what is the ratio of the longer side of the sheet to the shorter side?

Hint to puzzle : Folded sheet of paper

Draw a straight line between the two corners used to make the fold, and consider similar triangles.

------------------------------------------------------------------------------------------------------------
 Two logicians 
Two perfect logicians, S and P, are told that integers x and y have been chosen such that 1 < x < y and x +y < 100.  S is given the value x+y and P is given the value xy.  They then have the following conversation.
P:  I cannot determine the two numbers. S:  I knew that. P:  Now I can determine them. S:  So can I.
Given that the above statements are true, what are the two numbers?  (Computer assistance allowed.)
------------------------------------------------------------------------------------------------------------
 Confused bank teller 

A confused bank teller transposed the dollars and cents when he cashed a check for Ms Smith, giving her dollars instead of cents and cents instead of dollars.  After buying a newspaper for 50 cents, Ms Smith noticed that she had left exactly three times as much as the original check.  What was the amount of the check?  (Note: 1 dollar = 100 cents.)

Hint to puzzle 5: Confused bank teller

Let x be the number of dollars in the check, and y be the number of cents.  Using the fact that one dollar is equal to 100 cents, write a Diophantine equation connecting x and y.

-----------------------------------------------------------------------------------------------------------
Ant on a box 
A 12 by 25 by 36 cm cereal box is lying on the floor on one of its 25 by 36 cm faces.  An ant, located at one of the bottom corners of the box, must crawl along the outside of the box to reach the opposite bottom corner.  What is the length of the shortest such path?

Note: The ant can walk on any of the five faces of the box, except for the bottom face, which is flush in contact with the floor.  It can crawl along any of the edges.  It cannot crawl under the box.

Hint to puzzle 6: Ant on a box

The shortest path is a straight line over the top of the box.


Monday, September 1, 2014

Demise of an Idea and birth of another so called Java.

 Extract From the demise of an idea and birth of another so called java (sun microsystem). By now, the work on Oak had been significant but come the year 1993,people saw the demise of set-top boxes, interactive TV and the PDAs. A failure that completely ushered the inventors’ thoughts to be reinvented. Only a miracle could make the project a success now. And such a miracle awaited anticipation. NATIONAL CENTER FOR SUPERCOMPUTING APPLICATIONS (NCSA) had just unveiled its new commercial webbrowser for the internet the previous year. The focus of the team,now diverted towards where they thought the "next-wave" of computing would be−the internet. The team then divulged into the realms of creating the same embeddable technology to be used in the web browser space calling it AN APPLET −a small application. The teamnow neededa proper identity and they decided on naming the new technology they created Java ushering a new gen- eration of products for the internet boom. A by-product of the project was a cartoon named "DUKE"created by Joe Parlang which became its identity then.

Saturday, August 30, 2014

History of Java Language

                                   The Unmatched programming language that you will see on any software platform in the world 'java'. On 23 MAY 1995, JOHN GAGE, the director of the Science Office of the SUN MICROSYS- TEMS4 along with MARC ANDREESEN, co-founder and executive vice president at NETSCAPE announced to an audience of SunWorldTM that Java technology wasn’t a myth and that it was a realityandthatitwasgoingtobeincorporatedinto NETSCAPE NAVIGATOR.
At the time the total number of people working on Java were less than 30 people.<ref name="CITEREFEarlyYearsSun1"/> This team would shape the future in the next decade and no one had any idea as to what was in store. From being the mind of an unmanned vehicle on MARS to the operating environment on most of the consumer electronics, e.g., cable set-top boxes,VCR’s, toasters, and also for PERSONAL DATA ASSISTANTS (PDAs).11 Java has come a long wayfromitsinception. 

The heuristic method



                      In optimization problemsheuristic algorithms can be used to find a solution close to The Best Possible the optimal solution in cases where finding the optimal solution is impractical. These algorithms work by getting closer and closer to the optimal solution as they progress. In principle, if run for an infinite amount of time, they will find that optimal solution. Their merit is that they can find a solution very close to the optimal solution in a relatively short time. Such algorithms include local searchtabu searchsimulated annealing, andgenetic algorithms. Some of them, like simulated annealing, are non-deterministic algorithms while others, like tabu search, are deterministic. When a bound on the error of the non-optimal solution is known, the algorithm is further categorized as an approximation algorithm.
source:wikipedia

Friday, August 29, 2014

Method 5:Hill Climbing Technique


                  Hill climbing is a technique for certain classes of optimization problems.This Methode is used by newton to find roots. The idea is to start with a sub-optimal solution to a problem (i.e., start at the base of a hill) and then repeatedly improve the solution (walk up the hill) until some condition is maximized (the top of the hill is reached).
Hill-Climbing Methodology
1. Construct a sub-optimal solution that meets the constraints of the problem
2. Take the solution and make an improvement upon it
3. Repeatedly improve the solution until no more improvements are necessary/possible

                One of the most popular hill-climbing problems is the network flow problem. Although network flow may sound somewhat specific it is important because it has high expressive power: for example, many algorithmic problems encountered in practice can actually be considered special cases of network flow. After covering a simple example of the hill-climbing approach for a numerical problem we cover network flow and then present examples of applications of network flow.

Method 4: Greedy Algorithm

                         In the backtracking algorithms we looked at, we saw algorithms that found decision points and recursed over all options from that decision point. A greedy algorithm can be thought of as a backtracking algorithm where at each decision point "the best" option is already known and thus can be picked without having to recurse over any of the alternative options.
                         The name "greedy" comes from the fact that the algorithms make decisions based on a single criterion, instead of a global analysis that would take into account the decision's effect on further steps. As we will see, such a backtracking analysis will be unnecessary in the case of greedy algorithms, so it is not greedy in the sense of causing harm for only short-term gain.
                         Unlike backtracking algorithms greedy algorithm can't be made for every problem. Not every problem is "solvable" using greedy algorithms. Viewing the finding solution to an optimization problem as a hill climbing problem greedy algorithms can be used for only those hills where at every point taking the steepest step would lead to the peak always.
                         Greedy algorithms tend to be very efficient and can be implemented in a relatively straightforward fashion. Many a times in O(n) complexity as there would be a single choice at every point. However, most attempts at creating a correct greedy algorithm fail unless a precise proof of the algorithm's correctness is first demonstrated. When a greedy strategy fails to produce optimal results on all inputs, we instead refer to it as a heuristic instead of an algorithm. Heuristics can be useful when speed is more important than exact results (for example, when "good enough" results are sufficient).

Memoization Methodology for backtracking

Memoization Methodology for backtracking
1. Start with a backtracking algorithm
2. Look up the problem in a table; if there's a valid entry for it, return that value
3. Otherwise, compute the problem recursively, and then store the result in the table before returning the value
                         
                         Consider the solution presented in the backtracking chapter for the Longest Common Subsequence problem. In the execution of that algorithm, many common subproblems were computed repeatedly. As an optimization, we can compute these subproblems once and then store the result to read back later. A recursive memoization algorithm can be turned "bottom-up" into an iterative algorithm that fills in a table of solutions to subproblems. Some of the subproblems solved might not be needed by the end result (and that is where dynamic programming differs from memoization), but dynamic programming can be very efficient because the iterative version can better use the cache and have less call overhead. Asymptotically, dynamic programming and memoization have the same complexity.

Method 3:Dynamic Programming

                   Dynamic Programming is another Method to develope new algorithm.  Dynamic programming can be thought of as an optimization technique for particular classes of backtracking algorithms where sub problems are repeatedly solved. Note that the term dynamic in dynamic programming should not be confused with dynamic programming languages, like Scheme or Lisp. Nor should the term programming be confused with the act of writing computer programs. In the context of algorithms, dynamic programming always refers to the technique of filling in a table with values computed from other table values. (It's dynamic because the values in the table are filled in by the algorithm based on other values of the table, and it's programming in the sense of setting things in a table, like how television programming is concerned with when to broadcast what shows.)

Methode 2: Backtracking


Backtracking is a general algorithmic technique that considers searching every possible combination in order to solve an optimization problem. Backtracking is also known as depth-first search or branch and bound. By inserting more knowledge of the problem, the search tree can be pruned to avoid considering cases that don't look promising. While backtracking is useful for hard problems to which we do not know more efficient solutions, it is a poor solution for the everyday problems that other techniques are much better at solving.However, dynamic programming and greedy algorithms can be thought of as optimizations to backtracking, so the general technique behind backtracking is useful for understanding these more advanced concepts. Learning and understanding backtracking techniques first provides a good stepping stone to these more advanced techniques because you won't have to learn several new concepts all at once.
Backtracking Methodology
1. View picking a solution as a sequence of choices
2. For each choice, consider every option recursively
3. Return the best solution found
                                         This methodology is generic enough that it can be applied to most problems. However, even when taking care to improve a backtracking algorithm, it will probably still take exponential time rather than polynomial time. Additionally, exact time analysis of backtracking algorithms can be extremely difficult: instead, simpler upperbounds that may not be tight are given.

Method 1: Inventing an algorithm.

The first major algorithmic technique is divide and conquer.
This is the technique that britishers used to enter india.
Part of the trick of making a good divide and conquer algorithm is determining how a given problem could be separated into two or more similar, but smaller, subproblems. More generally, when we are creating a divide and conquer algorithm we will take the following steps:

Divide and Conquer Methodology

1. Given a problem, identify a small number of significantly smaller subproblems of the same type 2. Solve each subproblem recursively (the smallest possible size of a subproblem is a base-case) 3. Combine these solutions into a solution for the main problem
The first algorithm we'll present using this methodology is the merge sort.
Merge Sort The problem that merge sort solves is general sorting: given an unordered array of elements that have a total ordering, create an array that has the same elements sorted. More precisely, for an array a with indexes 1 through n, if the condition
for all i, j such that 1 ≤ i < j ≤ n then a[i] ≤ a[j]
holds, then a is said to be sorted. Here is the interface:
// sort -- returns a sorted copy of array a function sort(array a): array Following the divide and conquer methodology, how can a be broken up into smaller subproblems? Because a is an array of n elements, we might want to start by breaking the array into two arrays of size n/2 elements. These smaller arrays will also be unsorted and it is meaningful to sort these smaller problems; thus we can consider these smaller arrays "similar". Ignoring the base case for a moment, this reduces the problem into a different one: Given two sorted arrays, how can they be combined to form a single sorted array that contains all the elements of both given arrays:
// merge -- given a and b (assumed to be sorted) returns a merged array that // preserves order function merge(array a, array b): array So far, following the methodology has lead us to this point, but what about the base case? The base case is the part of the algorithm concerned with what happens when the problem cannot be broken into smaller subproblems. Here, the base case is when the array only has one element. The following is a sorting algorithm that faithfully sorts arrays of only zero or one elements.

Is Really Efficiency Required For Every Programme ?

When Efficiency is Important?
                                    The Major Question in front of quite satisfactory Programmer.......

 Not every problem requires the most efficient solution available. For our purposes, the term efficient is associated with the time or space needed to perform the task. When either time or space is abundant and cheap, it may not be worth it to pay a programmer to spend a day or so working to make a program faster.
However, here are some cases where efficiency matters:


• When resources are limited, a change in algorithms could create great savings and allow limited machines (like cell phones, embedded systems, and sensor networks) to be stretched to the frontier of possibility.


• When the data is large a more efficient solution can mean the difference between a task finishing in two days versus two weeks. Examples include physics, genetics, web searches, massive online stores, and network traffic analysis.


• Real time applications: the term "real time applications" actually refers to computations that give time guarantees, versus meaning "fast." However, the quality can be increased further by choosing the appropriate algorithm.


• Computationally expensive jobs, like fluid dynamics, partial differential equations, VLSI design, and cryptanalysis can sometimes only be considered when the solution is found efficiently enough.


• When a subroutine is common and frequently used, time spent on a more efficient implementation can result in benefits for every application that uses the subroutine. Examples include sorting, searching, pseudorandom number generation, kernel operations, database queries, and graphics.
In short, it's important to save time when you do not have any time to spare.
When is efficiency unimportant? Examples of these cases include prototypes that are used only a few times, cases where the input is small, when simplicity and ease of maintenance is more important, when the area concerned is not the bottle neck, or when there's another process or area in the code that would benefit far more from efficient design and attention to the algorithm(s).

Understanding an Algorithm

Understanding an Algorithm


The Best Video that Decribes the Concept Algorithm Very good By  David J. Malan
In TED-Ed Event. 



source: youtube.com  publisher: TED-Ed

Sunday, August 24, 2014

Feedback About D3 Labs Workshop @IIT KGP by Prameel Arjun ,CEO of D3 labs.....

The Seminar Is good and really Benifited to me as I used blogs but i dont know how to use adsense and make most of my blogging. Based Upon the 1st day Workshop I will rate them as 4.5 out of 5.0. Also the Hacking Part is nicely introduced with some tricks.

Algorithms

The Good Algorithm Ensures Certain Things which enable it to be concise.
The Crucial Things to be Kept in Mind While thinking an Algorithm are as follows : 
  the divide and conquer technique                                                                                                                                        the use of randomization in algorithms                                                                                                                                the general, but typically inefficient, backtracking technique;                                                                                                dynamic programming as an efficient optimization for some backtracking algorithms;                                     greedy algorithms as an optimization of other kinds of backtracking algorithms;                                                     hill-climbing techniques, including network flow.

The Basics of algorithm, Data Structure video-
source:Youtube

• Divide and Conquer: Many problems, particularly when the input is given in an array, can be solved by cutting the problem into smaller pieces , solving the smaller parts recursively , and then combining the solutions into a single result.
• Randomization: Increasingly, randomization techniques are important for many applications. This chapter presents some classical algorithms that make use of random numbers.      
• Backtracking: Almost any problem can be cast in some form as a backtracking algorithm. In backtracking, you consider all possible choices to solve a problem and recursively solve subproblems under the assumption that the choice is taken. The set of recursive calls generates a tree in which each set of choices in the tree is considered consecutively. Consequently, if a solution exists, it will eventually be found. 
Backtracking is generally an inefficient, brute-force technique, but there are optimizations that can be performed to reduce both the depth of the tree and the number of branches. The technique is called backtracking because after one leaf of the tree is visited, the algorithm will go back up the call stack (undoing choices that didn't lead to success), and then proceed down some other branch. To be solved with backtracking techniques, a problem needs to have some form of "self-similarity," that is, smaller instances of the problem (after a choice has been made) must resemble the original problem. Usually, problems can be generalized to become self- similar. 
• Dynamic Programming: Dynamic programming is an optimization technique for backtracking algorithms. When subproblems need to be solved repeatedly (i.e., when there are many duplicate branches in the backtracking algorithm) time can be saved by solving all of the subproblems first (bottom-up, from smallest to largest) and storing the solution to each subproblem in a table. Thus, each subproblem is only visited and solved once instead of repeatedly. The "programming" in this technique's name comes from programming in the sense of writing things down in a table; for example, television programming is making a table of what shows will be broadcast when. 
• Greedy Algorithms: A greedy algorithm can be useful when enough information is known about possible choices that "the best" choice can be determined without considering all possible choices. Typically, greedy algorithms are not challenging to write, but they are difficult to prove correct. 
• Hill Climbing: The final technique we explore is hill climbing. The basic idea is to start with a poor solution to a problem, and then repeatedly apply optimizations to that solution until it becomes optimal or meets some other requirement. An important case of hill climbing is network flow. Despite the name, network flow is useful for many problems that describe relationships, so it's not just for computer networks. Many matching problems can be solved using network flow. 






About me

 My Details
     Name- Amit Sanjay Patil                                                                                                                     
     e-mail address- apapapap44@gmail.com                                                                                           
     Student @ IIT Kharagpur  ( Mechanical Department)                                                                          
     Hometown - Jalgaon District Maharashtra                                                                                            
                         


                                        I am Interested in Developing smarter Algorithms for Computer  Programmes. I think its algorithm only which decides size of the programme completely. Algorithms are like "The More you look more you see", there is always  an alternative to the any task,the best possible one is the perfect algorithm.