Friday, November 25, 2016

Predictions for Airline Delays

Thanksgiving is one of the most traveled holiday of the year. According to AAA, an estimated 44 million people travel during the thanksgiving holiday and many people choose to travel by plane. That works fine most of the time, until you have a plane delay. We all hate delays and usually no one can see them coming, but recently researchers at Binghamton University, State University of New York (SUNY) have developed a new computer model which they say can predict airline delays faster than anything else in existence. Currently the way these predication models work is by using an artificial neural network. These work by analyzing different data associated with flight delay using a series of different algorithms. All together these algorithms are able to collectively analyze and predict flight delays based on variables like weather or security risks similar to how neurons in our brain work together to solve a problem (the neural in artificial neural network). This new ANN system analyzes 14 of these qualitative variables and tries to give the user a clearer relationship between variables which the system analyzes, and the delays that may or may not have been caused by it. In synthetic tests, this system made predictions that were 20% more accurate and 40% faster than systems currently in use. This could be big for heavy travel days during the year and could even help airports have more flights per day, hopefully reducing the time we have to spend waiting around at an airport. 


Sources:
http://traveltips.usatoday.com/busiest-travel-day-108182.html
https://www.sciencedaily.com/releases/2016/11/161114103905.htm
http://travelsort.com/blog/flight-cancellation-or-delay-tips-for-what-to-do

Friday, November 11, 2016

Regular Expressions: What are They and Why do They Matter?


When looking at the String.Split function for the programming assignment, I noticed that one of its parameters was “String regex. The description for this method read “Splits this string around matches of the given regular expression”. What I gathered that to mean was that this method could split a string based on a pattern that you gave to the method. But what exactly is a pattern and what is a regular expression?
Regular expressions (called regex sometimes) are actually a huge part of java and other programming languages. Regular expression is an API in java which allows us to define a pattern which can be used to do all sorts of things with text. You can use it to search for a specific pattern, modify text using it, and like I mentioned earlier, you can split a string using one. These patterns can range from just a single character, to complex strings with characters, numbers, and symbols. Its really up to what the programmer wants to use them for. One use for regular expressions it matching. Using these patterns, you can search for instances of the patterns in text and do something as simple as return a Boolean if the pattern is found, or replace every instance of the pattern with something else completely. There are an incredible amount of possible actions you can perform on text using a regular expression. In the tables below there are some already existing patterns but a programmer can design their own pattern if they wish. The Regex is a powerful tool in java and can be incredibly useful to us whenever we deal with text in a program.















Sources:

The quote is from: http://docs.oracle.com/javase/7/docs/api/java/lang/String.html

all the tables are from :http://www.vogella.com/tutorials/JavaRegular Expressions /article          .html#what-are-regular-expressions

other sources used:

http://www.ocpsoft.org/opensource/guide-to-regular-expressions-in-java-part-1/#section-14
http://www.javatpoint.com/java-regex

Friday, November 4, 2016

P vs MP - What does it Mean?


Computer Science is based around the idea of using algorithms to solve a wide variety of problems. Most problems you can think of can be translated into a program and run by a computer. However, there are a few theoretical problems in Computer Science which continue to remain unsolved; one of these problems is whether P = NP. It has yet to be solved and you can get paid 1 million dollars for solving it but what does it mean? Well in this equation, P stands for polynomial and NP stands for nondeterministic polynomial time. These basically refer to types of problems and the time it takes to solve them. NP represents problems whose solutions can be verified relatively quickly but takes a very long time to actually solve the problem. A good example that Larry Hardesty gave for MIT news is finding prime factors of a number. All you need to to to verify a solution is multiply these numbers together, but to actually solve the problem a program has to look at individual numbers and test them until it finds a solution. this example is actually one way that online information is protected. So the question posed by the equation is if a problem exists that takes a relatively short amount of time to check,  does it also take a short amount of time to solve? This problem is particularly important to online security, which uses cyphers and code to protect data. The solution to a cypher can be checked easily – just see if you can get past a security system, but solving this problem takes a long long time. The time it takes to solve these problems (depending on the problem it could take years and years to finally solve) is what makes it secure. However, if there is a way to solve a problem like this in the same timeframe it takes to verify its solution, it would greatly change how we use computers to solve problems.


sources:

http://news.mit.edu/2009/explainer-pnp
http://www.claymath.org/millennium-problems/p-vs-np-problem
https://www.theguardian.com/technology/2013/sep/05/how-internet-encryption-works