Artificial Intelligence Programming Assignment
Problem Statements
Eight-Queens Puzzle
Is it possible to place eight Queens on a chessboard, so that none of the Queens occupy the same row, column, or diagonal?
Binary Search
Depth-First & Breadth-First Search
Newton’s Method
Take a number whose square root is to be calculated, any positive number.
Take a guess at the number’s square root.
Calculate the square root by improving on the current guess as indicated:
Next guess = (number/ current guess + current guess)/ 2
Repeat this process until the difference between the next guess and the current is within the accepted level of accuracy. The better your guess, the fewer the number of iterations needed to get the square root. A good first guess is typically half the number whose square root is to be calculated. The process is ten repeated until the desired accuracy is achieved.
Newton-Raphson Method
Determine a root of the equation f(x) = x^3-x^2-9x+9 = 0 using the Newton-Raphson method if the initial guess is x1 = 1.5.
Gauss-Siedel Method
Solve the following set of linear simultaneous equations using the Gauss-Seidel method:
10x1 + 2x2 + 3x3 = 11
X1 + 5x2 + 2x3 = 20
3x1 + 2x2 + 6x3 = -12
Theoretical Solutions
Eight-Queens Puzzle
1. Pick a position for the Queen
2. If legal, go to next row.
3. If illegal, pick the next position.
4. If no legal position is found, back up to one row.
If legal positions are found for all eight rows, the problem is solved.
Binary Search
• Search the current node value to see if it equals the search value.
• If the search value is smaller than the current value, make the current node the
left child node.
• Make the current node the right child node.
Depth-First & Breadth-First Search
Depth-First Search:
• Searches as far down the left side of the binary tree.
• When it encounters, NULL, the search switches to the bottom-most right child and
resumes.
Breadth-First Search:
• Remove a node from the queue. This becomes the current node.
• Place all child nodes of the current node onto the queue.
Newton’s Method
• Get a positive number whose square root is to be calculated from the user.
• Get the desired precision.
• While more numbers remain, calculate firs guess, x0.
• Repeat
Xn = 0.5 * (X (n-1) + Number/ X (n-1))
Until abs (Xn - X (n – 1)) *= Desired precision
Get a positive number whose square root is to be calculated from the user.
Get the desired precision.
End while
Newton-Raphson Method
1. Set number of iterations num_iter to zero.
The shockingly low minimum wage in America is borderline unethical. Since the minimum wage was established in 1938, there’s been controversy about how much it should be. It was originally set at an amount that would allow workers to maintain a minimal standard of living (30 Days). Since then, the minimum wage has been raised 22 times, but this hasn’t been enough to support the same goal. Not only has inflation made minimum wage worth significantly less, but the cost of living has gone up. Two thirds of American citizens support raising minimum wage again (Mantel, 76), but some still oppose it, saying it would hurt jobs and the economy. Although raising the federal minimum wage would most likely cause some jobs to be lost, it should be raised because of the positive effect it would have on poverty rates, the economy, and the individuals living on it.
Step Two: The next step, will be to get rid of the square root. So, to get rid of the square root we must square it. Remember with equations, what you do to one side you do it to the other.
The United States minimum wage is not indexed to inflation. Due to this fact, the purchasing power of minimum wage falls as the price of consumer goods increases. The current hourly minimum wage is set at $7.25, however many states do pay above this rate. One example of this is in Michigan, the current hourly minimum wage is $7.40. The last time a change occurred to raise minimum wage was in 2009. President Obama has put out a proposal that is designed to raise the federally required hourly minimum wage to $10.10 in 2015. The public opinion of this proposal is all over the board ranging from a positive outlook to a negative one. Some of the negative remarks are that it would dampen the economy and shrink the hiring done by small businesses. “The Household Survival Budget for the average New Jersey family of four is $58,500 and for a single adult is $25,368 in 2010. These numbers highl...
Poverty continues to grow in America. The average minimum wage in the United States is $7.35 an hour- far too low in today’s society. Key expenses, for example, gas and housing prices, have gone up significantly since the minimum wage was last changed in 2007 (Wagner 52). The laws creating the minimum wage were intended to improve the standard of living and decrease poverty. Raising minimum wage is a vital step in decreasing poverty and giving every family the opportunity to survive and succeed. Millions of hard-working Americans are below the poverty line and need an increase in pay. Minimum wage must be raised because it will diminish poverty and assist the working class to support their families.
Currently, in the United States, the federal minimum wage has been $7.25 for the past six years; however, in 1938 when it first became a law, it was only $0.25. In the United States the federal minimum wage has been raised 22 times since 1938 by a significant amount due to changes in the economy. Minimum wage was created to help America in poverty and consumer power purchasing, but studies have shown that minimum wage increases do not reduce poverty. By increasing the minimum wage, it “will lift some families out of poverty, while other low-skilled workers may lose their jobs, which reduces their income and drops their families into poverty” (Wilson 4). When increasing minimum wage low-skilled, workers living in poor families,
An intelligent software assistant, also called an intelligent software agent, cognitive assistant or cognitive agent, is a software agent that is also an intelligent agent which performs a task with minimum specific directions from users. It evolves from the concept of virtual personal assistant, a cognitive assistant that learns and organizes. Intelligent software assistant combines traditionally isolated approaches to artificial intelligence to try to create a personal-assistant program that improves by interacting with its user.
First generation languages are machine level languages which basically consist of 1’s and 0’s. Instructions had to be entered through the front switches and no translators were used. The main advantage was that a code written by a user could run very fast and efficiently because it was executed directly by the CPU. They were introduced in the 1940’s. Even though programs written were small and simple, it was hectic to correct it if an error occurred. Examples are architecture specific binary delivered on switches or tapes.
Minimum wage is a difficult number to decide on because it affects different income earning citizens in different ways. According to Principles of Microeconomics, by N. Gregory Mankiw, minimum wage is a law that establishes the lowest price for labor that and employer may pay (Mankiw 6-1b). Currently, the minimum wage in the United States is $7.25 per hour. For many years politicians and citizens have argued on what should be the minimum wage that would benefit the economy and society in general. A minimum wage was first established in 1938 to increase the standard of living of lower class workers. To discuss what is better for the country and its citizens, people have to understand what is a minimum wage and what are its effects.
After placing all queens one of the possible solution will look like the diagram shown below.
Analysts will input the following information into a simple linear regression model provided in Excel QM using a simple linear regression formula Yi =b_0+ b_1 X_1. In FIGURE 1-3 the highlighted Coefficients are provided. The b_0 is -18.3975 and the b_1 is 26.3479, these coefficients are added to the formula that is represented in figure 1-4.
Today the federal minimum wage is $5.15, but should be about $8.50 if Congress had adjusted it for inflation over the past 35 years. While $5.15 may not seen that bad, when factoring in such variables as sky rocketing gas prices, budgets can get pretty tight. David Shepard, a sophomore at Wayne State University, worked at a Meijer Retail and Grocery Superstore for over two years while in high school. At the time Shepard lived with his parents and didn’t have to worry about paying rent or buying groceries, all that he had to pay for was filling up his gas tank and paying for his car insurance. Shepard recalled, “It was all I could do to pay for the basics like gas and bill’s, I barely had any money to have fun on the weekends”. This is only an example of a high school student that can nearly slip by on minimum wage with only a few expenses. There are 1.8 million people in America with children under the age of 18 that would benefit from an increase in minimum wage (Minimum).
That is, the method of iteration will converge if in each equation of the given system, the absolute value of the largest coefficient is greater than the sum of the absolute values of all the remaining coefficients.
Pascal programming language was designed in 1968, and published in 1970. It is a small and efficient language intended to encourage good programming practices using structured programming and data structuring. Pascal was developed by Niklaus Wirth. The language was named in honor of the French mathematician and philosopher Blaise Pascal. In 1641, Pascal created the first arithmetical machine. Some say it was the first computer. Wirth improved the instrument eight years later. In 1650, Pascal left geometry and physics, and started his focus towards religious studies. A generation of students used Pascal as an introduction language in undergraduate courses. Types of Pascal have also frequently been used for everything from research projects to PC games. Niklaus Wirth reports that a first attempt to merge it in Fortran in 1969 was unsuccessful because of Fortran's lack of complex data structures. The second attempt was developed in the Pascal language itself and was operational by mid-1970. A generation of students used Pascal as an introductory language in undergraduate courses. Pascal, in its original form, is a Procedural language and includes the traditional like control structures with reserved words such as IF, THEN, ELSE, WHILE, FOR, and so on. However, Pascal has many data structuring and other ideas which were not included in the original, like type definitions, records, pointers, enumerations, and sets. The earliest computers were programmed in machine code. This type of programming is time consuming and error prone, as well as very difficult to change and understand. Programming is a time-consuming a process. More advanced languages were developed to resolve this problem. High level languages include a set of instruction...
The computer science field is one of the fastest advancing technological fields in today’s day and age, with new discoveries and research happening on a daily basis. Computers and their applications are in constant flux, as we create more efficient ways to profess electronic information. With a field changing so rapidly, we must remember and continue to study the roots these advancements if we are to understand all of the new material being produced. Although we focus on the western computer scientists, we sometimes forget the contributions that come from the East, specifically from Africa. Historically there have been many computer scientists from Africa that have contributed to the advancement of the computer science field. Thus far we have neglected to appreciate or acknowledge their contributions, even though we could not be at our current state without them. All discoveries in the computer science field build upon a previous discovery, and for this reason, to neglect past contribution or advancements, is to neglect the future. This is why we must change our focus and recognize the major advancements, such as the Niagara, or the Logo projects; both of which would not have been possible without the influence of African Computer Scientists. Africa has made key contributions to the computer science field through its work on the Niagara project, the Logo Computer Systems Inc, The Connection Machine, The South African Computer Science Network, and ________.
Generates only a single point solution for each iteration, a sequence of those converging to the optimal solution.