Computability Theory Archives - https://www.theoryofcomputation.co/category/computability-theory/ Science of Computer Wed, 16 Oct 2019 14:48:14 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 https://i0.wp.com/www.theoryofcomputation.co/wp-content/uploads/2018/08/cropped-favicon-512x512-2.png?fit=32%2C32&ssl=1 Computability Theory Archives - https://www.theoryofcomputation.co/category/computability-theory/ 32 32 149926143 What is Blockchain Technology? https://www.theoryofcomputation.co/what-is-blockchain-technology/ Wed, 16 Oct 2019 14:48:12 +0000 https://www.theoryofcomputation.co/?p=416 What is Blockchain Technology? The blockchain is an incorruptible digital ledger of economic transactions that can be programmed to record not just financial transactions but virtually everything of value.” – Don & Alex Tapscott, authors Blockchain Revolution (2016). With a blockchain, many people can write entries into a record of information, and a community of...

The post What is Blockchain Technology? appeared first on .

]]>
What is Blockchain Technology?

Blockchain Technology

The blockchain is an incorruptible digital ledger of economic transactions that can be programmed to record not just financial transactions but virtually everything of value.” – Don & Alex Tapscott, authors Blockchain Revolution (2016).

With a blockchain, many people can write entries into a record of information, and a community of users can control how the record of information is amended and updated. Likewise, Wikipedia entries are not the product of a single publisher. No one person controls the information.

Descending to ground level, however, the differences that make blockchain technology unique become more clear. While both run on distributed networks (the internet), Wikipedia is built into the World Wide Web (WWW) using a client-server network model.

A user (client) with permissions associated with its account is able to change Wikipedia entries stored on a centralized server.

Whenever a user accesses the Wikipedia page, they will get the updated version of the ‘master copy’ of the Wikipedia entry. Control of the database remains with Wikipedia administrators allowing for access and permissions to be maintained by a central authority.

Is Blockchain Technology the New Internet?

The blockchain is an undeniably ingenious invention – the brainchild of a person or group of people known by the pseudonym, Satoshi Nakamoto. But since then, it has evolved into something greater, and the main question every single person is asking is: What is Blockchain?

By allowing digital information to be distributed but not copied, blockchain technology created the backbone of a new type of internet. Originally devised for the digital currency, Bitcoin, (Buy Bitcoin) the tech community has now found other potential uses for the technology.

Blockchain Transaction Cycle

A blockchain is, in the simplest of terms, a time-stamped series of immutable record of data that is managed by cluster of computers not owned by any single entity. Each of these blocks of data (i.e. block) are secured and bound to each other using cryptographic principles (i.e. chain).

So, what is so special about it and why are we saying that it has industry disrupting capabilities?

The blockchain network has no central authority — it is the very definition of a democratized system. Since it is a shared and immutable ledger, the information in it is open for anyone and everyone to see. Hence, anything that is built on the blockchain is by its very nature transparent and everyone involved is accountable for their actions.

Blockchain Explained

A blockchain carries no transaction cost. (An infrastructure cost yes, but no transaction cost.) The blockchain is a simple yet ingenious way of passing information from A to B in a fully automated and safe manner. One party to a transaction initiates the process by creating a block. This block is verified by thousands, perhaps millions of computers distributed around the net. The verified block is added to a chain, which is stored across the net, creating not just a unique record, but a unique record with a unique history. Falsifying a single record would mean falsifying the entire chain in millions of instances. That is virtually impossible. Bitcoin uses this model for monetary transactions, but it can be deployed in many others ways.

Think of a railway company. We buy tickets on an app or the web. The credit card company takes a cut for processing the transaction. With blockchain, not only can the railway operator save on credit card processing fees, it can move the entire ticketing process to the blockchain. The two parties in the transaction are the railway company and the passenger. The ticket is a block, which will be added to a ticket blockchain. Just as a monetary transaction on blockchain is a unique, independently verifiable and unfalsifiable record (like Bitcoin), so can your ticket be. Incidentally, the final ticket blockchain is also a record of all transactions for, say, a certain train route, or even the entire train network, comprising every ticket ever sold, every journey ever taken.

But the key here is this: it’s free. Not only can the blockchain transfer and store money, but it can also replace all processes and business models which rely on charging a small fee for a transaction. Or any other transaction between two parties.

Even recent entrants like Uber and AirBnB are threatened by blockchain technology. All you need to do is encode the transactional information for a car ride or an overnight stay, and again you have a perfectly safe way that disrupts the business model of the companies which have just begun to challenge the traditional economy. We are not just cutting out the fee-processing middle man, we are also eliminating the need for the match-making platform.

Because blockchain transactions are free, you can charge minuscule amounts, say 1/100 of a cent for a video view or article read. Why should I pay The Economist or National Geographic an annual subscription fee if I can pay per article on Facebook or my favorite chat app. Again, remember that blockchain transactions carry no transaction cost. You can charge for anything in any amount without worrying about third parties cutting into your profits.

Wikipedia’s digital backbone is similar to the highly protected and centralized databases that governments or banks or insurance companies keep today. Control of centralized databases rests with their owners, including the management of updates, access and protecting against cyber-threats.

The distributed database created by blockchain technology has a fundamentally different digital backbone. This is also the most distinct and important feature of blockchain technology.

Wikipedia’s ‘master copy’ is edited on a server and all users see the new version. In the case of a blockchain, every node in the network is coming to the same conclusion, each updating the record independently, with the most popular record becoming the de-facto official record in lieu of there being a master copy.

How Does Blockchain Work?

Picture a spreadsheet that is duplicated thousands of times across a network of computers. Then imagine that this network is designed to regularly update this spreadsheet and you have a basic understanding of the blockchain.

Information held on a blockchain exists as a shared — and continually reconciled — database. This is a way of using the network that has obvious benefits. The blockchain database isn’t stored in any single location, meaning the records it keeps are truly public and easily verifiable. No centralized version of this information exists for a hacker to corrupt. Hosted by millions of computers simultaneously, its data is accessible to anyone on the internet.

To go in deeper with the Google spreadsheet analogy, I would like you to read this piece from a blockchain specialist.

The reason why the blockchain has gained so much admiration is that:

  • It is not owned by a single entity, hence it is decentralized
  • The data is cryptographically stored inside
  • The blockchain is immutable, so no one can tamper with the data that is inside the blockchain
  • The blockchain is transparent so one can track the data if they want to

The Three Pillars of Blockchain Technology

The three main properties of Blockchain Technology which has helped it gain widespread acclaim are as follows:

  • Decentralization
  • Transparency
  • Immutability

Pillar #1: Decentralization

Before Bitcoin and BitTorrent came along, we were more used to centralized services. The idea is very simple. You have a centralized entity which stored all the data and you’d have to interact solely with this entity to get whatever information you required.

Another example of a centralized system is banks. They store all your money, and the only way that you can pay someone is by going through the bank.

The traditional client-server model is a perfect example of this:

Client Server Architecture

When you google search for something, you send a query to the server who then gets back at you with the relevant information. That is simple client-server.

Now, centralized systems have treated us well for many years, however, they have several vulnerabilities.

  • Firstly, because they are centralized, all the data is stored in one spot. This makes them easy target spots for potential hackers.
  • If the centralized system were to go through a software upgrade, it would halt the entire system
  • What if the centralized entity somehow shut down for whatever reason? That way nobody will be able to access the information that it possesses
  • Worst case scenario, what if this entity gets corrupted and malicious? If that happens then all the data that is inside the blockchain will be compromised.

So, what happens if we just take this centralized entity away?

In a decentralized system, the information is not stored by one single entity. In fact, everyone in the network owns the information.

In a decentralized network, if you wanted to interact with your friend then you can do so directly without going through a third party. That was the main ideology behind Bitcoins. You and only you alone are in charge of your money. You can send your money to anyone you want without having to go through a bank.

Cryptocurrency

Centralized and Decentralized Network Architecture

Pillar #2: Transparency

One of the most interesting and misunderstood concepts in blockchain technology is “transparency.” Some people say that blockchain gives you privacy while some say that it is transparent. Why do you think that happens?

Well… a person’s identity is hidden via complex cryptography and represented only by their public address. So, if you were to look up a person’s transaction history, you will not see “Bob sent 1 BTC” instead you will see “1MF1bhsFLkBzzz9vpFYEmvwT2TbyCt7NZJ sent 1 BTC”.

The following snapshot of Ethereum transactions will show you what we mean:

snapshot of Ethereum transactions

So, while the person’s real identity is secure, you will still see all the transactions that were done by their public address. This level of transparency has never existed before within a financial system. It adds that extra, and much needed, level of accountability which is required by some of these biggest institutions.

Speaking purely from the point of view of cryptocurrency, if you know the public address of one of these big companies, you can simply pop it in an explorer and look at all the transactions that they have engaged in. This forces them to be honest, something that they have never had to deal with before.

However, that’s not the best use-case. We are pretty sure that most of these companies won’t transact using cryptocurrencies, and even if they do, they won’t do ALL their transactions using cryptocurrencies. However, what if the blockchain technology was integrated…say in their supply chain?

You can see why something like this can be very helpful for the finance industry right?

Pillar #3: Immutability

Immutability, in the context of the blockchain, means that once something has been entered into the blockchain, it cannot be tampered with.

Can you imagine how valuable this will be for financial institutes?

Imagine how many embezzlement cases can be nipped in the bud if people know that they can’t “work the books” and fiddle around with company accounts.

The reason why the blockchain gets this property is that of cryptographic hash function.

In simple terms, hashing means taking an input string of any length and giving out an output of a fixed length. In the context of cryptocurrencies like bitcoin, the transactions are taken as an input and run through a hashing algorithm (bitcoin uses SHA-256) which gives an output of a fixed length.

Let’s see how the hashing process works. We are going to put in certain inputs. For this exercise, we are going to use the SHA-256 (Secure Hashing Algorithm 256).

Secure Hashing Algorithm 256 Example Image

As you can see, in the case of SHA-256, no matter how big or small your input is, the output will always have a fixed 256-bits length. This becomes critical when you are dealing with a huge amount of data and transactions. So basically, instead of remembering the input data which could be huge, you can just remember the hash and keep track.

A cryptographic hash function is a special class of hash functions which has various properties making it ideal for cryptography. There are certain properties that a cryptographic hash function needs to have in order to be considered secure. You can read about those in detail in our guide on hashing.

There is just one property that we want you to focus on today. It is called the “Avalanche Effect.”

What does that mean?

Even if you make a small change in your input, the changes that will be reflected in the hash will be huge. Let’s test it out using SHA-256:

Avalanche Effect

You see that? Even though you just changed the case of the first alphabet of the input, look at how much that has affected the output hash. Now, let’s go back to our previous point when we were looking at blockchain architecture. What we said was:

The blockchain is a linked list which contains data and a hash pointer which points to its previous block, hence creating the chain. What is a hash pointer? A hash pointer is similar to a pointer, but instead of just containing the address of the previous block it also contains the hash of the data inside the previous block.

This one small tweak is what makes blockchains so amazingly reliable and trailblazing.

Imagine this for a second, a hacker attacks block 3 and tries to change the data. Because of the properties of hash functions, a slight change in data will change the hash drastically. This means that any slight changes made in block 3, will change the hash which is stored in block 2, now that in turn will change the data and the hash of block 2 which will result in changes in block 1 and so on and so forth. This will completely change the chain, which is impossible. This is exactly how blockchains attain immutability.

Courtesy & Reference: What is Block Chain Technology

 

The post What is Blockchain Technology? appeared first on .

]]>
416
What is Edge Computing? https://www.theoryofcomputation.co/what-is-edge-computing/ Sun, 25 Nov 2018 07:57:04 +0000 https://www.theoryofcomputation.in/?p=299 What is Edge Computing? Edge computing is the practice of processing data near the edge of your network, where the data is being generated, instead of in a centralized data-processing warehouse. Edge computing definition Edge computing is a distributed, open IT architecture that features decentralised processing power, enabling mobile computing and Internet of Things (IoT) technologies. In...

The post What is Edge Computing? appeared first on .

]]>
What is Edge Computing?

Edge computing is the practice of processing data near the edge of your network, where the data is being generated, instead of in a centralized data-processing warehouse.

Edge computing definition

Edge computing is a distributed, open IT architecture that features decentralised processing power, enabling mobile computing and Internet of Things (IoT) technologies. In edge computing, data is processed by the device itself or by a local computer or server, rather than being transmitted to a data centre.

Edge computing is a “mesh network of micro data centers that process or store critical data locally and push all received data to a central data center or cloud storage repository, in a footprint of less than 100 square feet,” according to research firm IDC.

It is typically referred to in IoT use cases, where edge devices would collect data – sometimes massive amounts of it – and send it all to a data center or cloud for processing. Edge computing triages the data locally so some of it is processed locally, reducing the backhaul traffic to the central repository.

Typically, this is done by the IoT devices transferring the data to a local device that includes compute, storage and network connectivity in a small form factor. Data is processed at the edge, and all or a portion of it is sent to the central processing or storage repository in a corporate data center, co-location facility or IaaS cloud.

edge computing

 

Why does edge computing matter?

Edge computing deployments are ideal in a variety of circumstances. One is when IoT devices have poor connectivity and it’s not efficient for IoT devices to be constantly connected to a central cloud.

Other use cases have to do with latency-sensitive processing of information. Edge computing reduces latency because data does not have to traverse over a network to a data center or cloud for processing. This is ideal for situations where latencies of milliseconds can be untenable, such as in financial services or manufacturing.

Here’s an example of an edge computing deployment: An oil rig in the ocean that has thousands of sensors producing large amounts of data, most of which could be inconsequential; perhaps it is data that confirms systems are working properly.

That data doesn’t necessarily need to be sent over a network as soon as its produced, so instead the local edge computing system compiles the data and sends daily reports to a central data center or cloud for long-term storage. By only sending important data over the network, the edge computing system reduces the data traversing the network.

Another use case for edge computing has been the buildout of next-gen 5G cellular networks by telecommunication companies. Kelly Quinn, research manager at IDC who studies edge computing, predicts that as telecom providers build 5G into their wireless networks they will increasingly add micro-data centers that are either integrated into or located adjacent to 5G towers. Business customers would be able to own or rent space in these micro-data centers to do edge computing, then have direct access to a gateway into the telecom provider’s broader network, which could connect to a public IaaS cloud provider.

Edge computing security

There are two sides of the edge computing security coin. Some argue that security is theoretically better in an edge computing environment because data is not traveling over a network, and it’s staying closer to where it was created. The less data in a corporate data center or cloud environment, the less data there is to be vulnerable if one of those environments is comprised.

The flip side of that is some believe edge computing is inherently less secure because the edge devices themselves can be more vulnerable. In designing any edge or fog computing deployment, therefore, security must be a paramount. Data encryption, access control and use of virtual private network tunneling are important elements in protecting edge computing systems.

Edge computing terms and definitions

Like most technology areas, edge computing has its own lexicon. Here are brief definitions of some of the more commonly used terms

  • Edge devices: These can be any device that produces data. These could be sensors, industrial machines or other devices that produce or collect data.
  • Edge: What the edge is depends on the use case. In a telecommunications field, perhaps the edge is a cell phone or maybe it’s a cell tower. In an automotive scenario, the edge of the network could be a car. In manufacturing, it could be a machine on a shop floor; in enterprise IT, the edge could be a laptop.
  • Edge gateway: A gateway is the buffer between where edge computing processing is done and the broader fog network. The gateway is the window into the larger environment beyond the edge of the network.
  • Fat client: Software that can do some data processing in edge devices. This is opposed to a thin client, which would merely transfer data.
  • Edge computing equipment: Edge computing uses a range of existing and new equipment. Many devices, sensors and machines can be outfitted to work in an edge computing environment by simply making them Internet-accessible. Cisco and other hardware vendors have a line of ruggedized network equipment that has hardened exteriors meant to be used in field environments. A range of compute servers, converged systems and even storage-based hardware systems like Amazon Web Service’s Snowball can be used in edge computing deployments.
  • Mobile edge computing: This refers to the buildout of edge computing systems in telecommunications systems, particularly 5G scenarios.

Edge vs. Fog computing

As the edge computing market takes shape, there’s an important term related to edge that is catching on: fog computing.

Fog refers to the network connections between edge devices and the cloud. Edge, on the other hand, refers more specifically to the computational processes being done close to the edge devices. So, fog includes edge computing, but fog would also incorporate the network needed to get processed data to its final destination.

Backers of the OpenFog Consortium, an organization headed by Cisco, Intel, Microsoft, Dell EMC and academic institutions like Princeton and Purdue universities, are developing reference architectures for fog and edge computing deployments.

Some have predicted that edge computing could displace the cloud. But Mung Chaing, dean of Purdue University’s School of Engineering and co-chair of the OpenFog Consortium, believes that no single computing domain will dominate; rather there will be a continuum. Edge and fog computing are useful when real-time analysis of field data is required

Like us on Facebook

The post What is Edge Computing? appeared first on .

]]>
299
Proof by Induction – Mathematical Preliminaries Part 4 https://www.theoryofcomputation.co/proof-by-induction/ Sun, 28 Oct 2018 06:35:45 +0000 https://www.theoryofcomputation.in/?p=281 A proof by induction is the powerful and important technique for proving theorems, in which every step must be justified. For each positive integer n, let P(n) be a mathematical statement that depends on n. Assume we wish to prove that P(n) is true for all positive integers n.A proof by induction of such a statement is carried out as follows: Basis:...

The post Proof by Induction – Mathematical Preliminaries Part 4 appeared first on .

]]>
A proof by induction is the powerful and important technique for proving theorems, in which every step must be justified.

proof by induction

For each positive integer n, let P(n) be a mathematical statement that depends on n. Assume we wish to prove that P(n) is true for all positive integers n.A proof by induction of such a statement is carried out as follows:

Basis: Prove that P(1) is true.

Induction Step: Prove that for all n ≥ 1, the following holds: If P(n) is true, then P(n+1) is also true.

In the induction step, we choose an arbitrary integer n ≥ 1 and assume that P(n) is true; this is called the induction hypothesis. Then we prove that P(n+1) is also true.

Theorem 1: For all positive integers n, we have 1 + 2 + 3 + ….+ n = n(n+1)/2.

Proof: We start with the basis of the induction. If n = 1, then the left-hand side is equal to 1, and so is the right-hand side. So the theorem is true for n = 1.

For induction step, let n ≥ 1 and assume that the theorem is true for n, i.e., assume that 1 + 2 + 3 + …. +n =  n (n + 1) / 2

So what induction is saying , it should be true for n + 1 which means:

1 + 2 + 3 + …. + (n + 1)  = (n + 1)((n+1) + 1) / 2 , where n replaced with (n  + 1), by the induction hypothesis

this implies to

1 + 2 + 3 + …. + n + 1 = (n + 1) (n + 2) /2 , so we will prove this and it will proved the theorem.

Now takes L. H .S

=> 1 + 2 + 3 + ….. +  (n + 1) = 1 + 2 + 3 + ….. + n + n + 1 , (n + 1 comes after n)

we know 1 + 2 + 3 + …. + n = n(n+1)/2

=> n(n+1)/2 + (n + 1)

=> (n2 + n + 2n + 2)  / 2

=> (n(n + 1) + 2(n+1)) / 2  , by distribution of division over addition (or factorization)

=> (n + 1) (n + 2) / 2 = R.H.S

Also Read: Pigeon Hole Principle Mathematical Preliminaries Part 3


The post Proof by Induction – Mathematical Preliminaries Part 4 appeared first on .

]]>
281
Mathematical Statement https://www.theoryofcomputation.co/mathematical-statement/ Tue, 16 Oct 2018 18:37:47 +0000 https://www.theoryofcomputation.in/?p=276 Mathematical Statement For understanding any mathematical statement we first need to recollect what maths is basically. When we solve any problem in maths our solution is either right or wrong. There is no midway to the problems! Similar is the situation with any mathematical statement. A mathematical statement is either true or false. Mathematical Statement...

The post Mathematical Statement appeared first on .

]]>
Mathematical Statement

For understanding any mathematical statement we first need to recollect what maths is basically. When we solve any problem in maths our solution is either right or wrong. There is no midway to the problems! Similar is the situation with any mathematical statement. A mathematical statement is either true or false.

Mathematical Statement Definition:

A statement (or proposition) is a sentence that is either true or false (both not both).

So ‘3 is an odd integer’ is a statement. But ‘π is a cool number’ is not a (mathematical) statement. Note that ‘4 is an odd integer’ is also a statement, but it is a false statement.

Any statement which is predicted to be both cannot be a mathematical statement. For understanding this we take three sentences:

  • The first prime minister of United States was a woman.
  • Blue Whale is the largest animal on Earth.
  • Girls are intelligent than boys.

The first statement is false while the second is true, but when we consider the third statement for some it is true while for others it is false. All girls are not intelligent than boys. So a statement which is either true or false is called a mathematical statement.

Every statement that is either true or false is said to be a mathematically accepted one, hence is called a mathematical statement.

Mathematical Statement In Discrete Mathematics

A meaningful composition of words which can be considered either true or false is called a mathematical statement or simply a statement.

A single letter shall be used to denote a statement. For example, the letter ‘p’ may be used to stand for the statement “ABC is an equilateral triangle.” Thus, p = ABC is an equilateral triangle.

Production of New Statement

New statements from given statements can be produced by:

  1. Negation: ∼
    If p is a statement then its negation ‘∼p’ is statement ‘not p’. ‘∼p’ has truth value F or T according to the truth value of  ‘p’ is T or F.
  2. Implication: ⇒
    If from a statement p another statement q follows, we say ‘p implies q’ and write ‘p⇒ q’. Such a result is called an implication. The truth value of ‘p ⇒ q’ is F only when p has truth value T and q has the truth value F.
    The statements involving ‘if p holds then q’ are of the kind p ⇒ q. For example, x= 2 ⇒ x2 = 4.
  3. Conjunction: ∧
    The sentence ‘p and q’ which may be denoted by ‘p ∧ q’ is the conjunction of p and q. The truth value of p ∧ q is T only when both p and q are true.
  4. Disjunction:  ∨
    The sentence ‘p or q (or both)’ which may be denoted by ‘p ∨ q’ is called the disjunction of the statements p and q. The truth value of p ∨ q is F only when both p and q are false.

Equivalence of Two Statements, p⇔q

Two statements p and q are said to be equivalent if one implies the other, and in such a case we use the double implication symbol ⇔ and write p ⇔ q.

The statements which involve the phrase ‘if and only if’ or ‘is equivalent to’ or ‘the necessary and sufficient conditions’ are of the kind p ⇔ q. For example, ABC is an equilateral triangle AB = BC = CA.

For brevity, the phrase ‘if and only if’ is shortened to “iff”. As described above, the symbols ∧ and ∨  stand for the words ‘and’ and ‘or’ respectively. The disjunction symbol ∨ is used in the logical sense ‘or’. The symbols ∧, ∨ are logical connectives and are frequently used.

The following is the table showing truth values of different compositions of statements. Such tables are called truth tables.

p
q
∼ p

∼ q

⇒ q

 q

∨ q

⇔ q

T
T
F
F
T
T
T
T
T
F
F
T
F
F
T
F
F
T
T
F
T
F
T
F
F
F
T
T
T
F
F
T

By forming truth tables, the equivalence of various statements can easily be ascertained. For example, we shall easily see that the implication ‘p ⇒ q’ is equivalent to ‘∼p ⇒ ∼q’. The implication ‘∼q ⇒ ∼p’ is called the contrapositive of p ⇒ q.

Read Also: Pigeon Hole Principle Mathematical Preliminaries Part 3

Example:

Question: Consider the statement, Given that people who are in need of refuge and consolation are apt to do odd things, it is clear that people who are apt to do odd things are in need of refuge and consolation. This statement, of the form (P ⇒ Q) ⇒ (Q ⇒ P) is logically equivalent to people

  1. who are in need of refuge and consolidation are not apt to do odd things
  2. that are apt to do odd things if and only if they are in need of refuge and consolidation
  3. who are apt to do odd things are in need of refuge and consolidation
  4. who are in need of refuge and consolidation are apt to do odd things

Solution: Option 3. People who are apt to do odd things are in need of refuge and consolidation. Given statement is “people who are in need of refuge and consolation are apt to do odd things”. It is in the form of p where p is “in need of refuge and consolation” and q is “apt to do odd things”.

So  q⇒p is equivalent to “people who are apt to do odd things are in need of refuge and consolation”. Therefore option 3 is correct.

The post Mathematical Statement appeared first on .

]]>
276
Pigeon Hole Principle Mathematical Preliminaries Part 3 https://www.theoryofcomputation.co/pigeon-hole-principle-mathematical-preliminaries-part-3/ Mon, 08 Oct 2018 19:16:49 +0000 https://www.theoryofcomputation.in/?p=266 Pigeon Hole Principle If n+1 or more objects are placed into n boxes, then there is at least one box containing two or more objects. In other words, if A and B  are two sets such that |A| > |B|, then there is no one-to-one function from A to B. Theorem 1: Let n be a positive integer. Every...

The post Pigeon Hole Principle Mathematical Preliminaries Part 3 appeared first on .

]]>
Pigeon Hole Principle

If n+1 or more objects are placed into n boxes, then there is at least one box containing two or more objects. In other words, if and  are two sets such that |A| > |B|, then there is no one-to-one function from A to B.

Theorem 1: Let n be a positive integer. Every sequence of n2 + 1 distinct real numbers contains a subsequence of length n+1 that is either increasing or decreasing.

Proof. For example consider the sequence (20, 10, 9, 7, 11, 2, 21, 1, 20, 31) of 10 = 32 + 1 numbers. This sequence contains an increasing subsequence of length 4 = 3 + 1, namely (10, 11, 21, 31).

The proof of this theorem is by contradiction, and uses the pigeon hole principle.

Let (a1, a2,…..,an2+1) be an arbitrary sequence of n2 + 1 distinct real numbers. For each i with 1 ≤ i ≤ n2 + 1, let inci denote the length of the longest increasing subsequence that starts at ai, and let deci denote the length of the longest decreasing subsequence that starts at ai
Using this notation, the claim in the theorem can be formulated as follows:

There is an index i such that inci ≥ n + 1 or deci ≥ n + 1.

We will prove the claim by contradiction. So we assume that inci ≤ n and deci ≤ n for all i with 1 ≤ i ≤ n2 + 1.
Consider a set

B = {(b,c): 1 ≤ b ≤ n, 1 ≤ c ≤n },

and think of the elements of B as being boxes. For each i with 1 ≤ i ≤ n2 + 1, the pair (inci, deci) is an element of B. So we have n2 + 1 elements (inci, deci), which are placed in the n2 boxes of B. By the pigeon hole principle, there must be a box that contains two (or more) elements. In other words, there exist two integers i and j and

(inci,deci) = (incj,decj)
.
Recall that the elements in the sequence are distinct. Hence, ai ≠ aj. We consider two cases.
First assume that ai < aj . Then the length of the longest increasing subsequence starting at ai must be at least 1 + incj, because we can append ai to the longest increasing subsequence starting at aj. Therefore, inci ≠ incj which is a contradiction.
The second case is when ai > aj. Then the length of the longest decreasing subsequence starting at ai must be at least 1 + decj, because we can append ai to the longest decreasing subsequence starting with aj. Therefore, deci ≠ decj, which is again a contradiction.

The post Pigeon Hole Principle Mathematical Preliminaries Part 3 appeared first on .

]]>
266
Proof By Contradiction in Proof Techniques Part 2 https://www.theoryofcomputation.co/proof-by-contradiction/ Thu, 04 Oct 2018 18:44:03 +0000 https://www.theoryofcomputation.in/?p=259 Proof by contradiction looks like, in this we assumed the contradiction and prove that what we assumed is contradict itself by using theorem that already proved or have the tautology. Theorem 1: Statement S is true. Proof by contradiction Proof: Assume that the statement S is false. Then, derive a contradiction (such as 1 + 1 =...

The post Proof By Contradiction in Proof Techniques Part 2 appeared first on .

]]>
Proof by contradiction looks like, in this we assumed the contradiction and prove that what we assumed is contradict itself by using theorem that already proved or have the tautology.

Theorem 1: Statement S is true. Proof by contradiction

Proof: Assume that the statement is false. Then, derive a contradiction (such as 1 + 1 = 3).

In other words, show that the statement “¬S ⇒ false” is true. This is sufficient, because the contrapositive of the statement “¬S ⇒ false” is the statement “true ⇒ S”. The latter logical formula is equivalent to S, and that is what we wanted to show.

Theorem 2: Let n be a positive integer. If n2 is even then n is even.

Proof: We will prove the theorem proof by contradiction. So we assume that n2 is even, but n is odd. Since n is odd, we know in our part 1 Theorem 1 that n2 is odd. This is a contradiction, because we assumed that n2 is even.

Theorem 3: √2 is irrational, i.e., √2 cannot be written as a fraction of two integers m and n.

Proof: We will prove the theorem by contradiction. So we assume that √2 is rational. Then √2 can be written as a fraction of two integers, √2  = m / n, where m ≥ 1 and  n ≥ 1. We may assume that m and n do not share any common factors, i.e., the greatest common divisor of m and n is equal to one; if this is not the case, then we can get rid of the common factors. By squaring √2 = m/n, we get 2n2=m2. This implies that m2 is even.Then by Theorem 2, m is which means that we can write m as m = 2k, for some positive integer k. It follows that 2n2 = m2 = 4k2, which implies that n2 = 2k2. Hence, n2 i

Proof by contradiction

s even. Again by Theorem 2, it follows that n is even.
We have shown that m and n are both even. But we know that m and n are not both even. Hence, we have contradiction. Our assumption that √2 is r

ational is wrong. Thus, we can conclude that √2 is irrational.

There is the nice discussion of this proof in the book My Brain is Open: The Mathematical Journeys of Paul Erdos. 

The post Proof By Contradiction in Proof Techniques Part 2 appeared first on .

]]>
259
Proof Techniques Mathematical Preliminaries Part 1 https://www.theoryofcomputation.co/proof-techniques-mathematical-preliminaries/ Thu, 27 Sep 2018 19:42:03 +0000 https://www.theoryofcomputation.in/?p=255 Proof techniques in mathematical preliminaries is a sequence of mathematical statements that form an argument to show that a theorem is true. The statements in the proof of a theorem include axioms (assumptions about the underlying mathematical structures), hypotheses of the theorem to be proved, and previously proved theorems. The main question is “How do...

The post Proof Techniques Mathematical Preliminaries Part 1 appeared first on .

]]>
Proof techniques in mathematical preliminaries is a sequence of mathematical statements that form an argument to show that a theorem is true.

The statements in the proof of a theorem include axioms (assumptions about the underlying mathematical structures), hypotheses of the theorem to be proved, and previously proved theorems. The main question is “How do we go about proving theorems?” This question is similar to the question of how to solve a given problem. Of course, the answer is that finding proofs, or solving problems, is not easy: otherwise life would be dull!

There is no specified way of coming up with a proof, but there are some generic strategies that could be of help. Here, we review some of these strategies. Here are some useful tips:

  1. Read and completely understand the statement of the theorem to be proved. Most often this is the hardest part.
  2. Sometimes, theorems contain theorems inside them. For example, “Property A if and only if propery B”, requires two statements:
    • If property A is true, then property B is true ( A ⇒ B).
    • If property B is true, then property A is true ( B ⇒ A).

    Another example is the theorem “Set A equals set B”. To prove this, we need to prove that A ⊆ B and B ⊆ A. That is, we need to show that each element of set A is i

  3. Try to divide the theorems into multiple simple cases that either prove the facts or tautology of the case.
  4. Try to write down the proofs once you have it. This is to ensure the correctness of your proof. Often, mistakes are found at the time of writing.
  5. Finding proofs takes time, we do not come prewired to produce proofs. Be patient, think, express and write clearly and try to be precise as much as possible.

Proof Strategies

Direct proofs

Theorem 1: If n is an odd integer, then n2 is odd as well.

Proof. An odd positive integer n can be written as n = 2k + 1, for some integer k ≥ 0. Then

n2 = (2k+1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is even and “even plus one is odd”, we can conclude that n2 is odd.

 

Theorem 2: Let G = ( V, E ) be a graph. Then sum of the degrees of all vertices is an even integer, i.e.,

v∈V deg(v)

is even.

Proof. If you do not see the meaning of this statement, then first try it out for few graphs. The reason why the statement holds is very simple: Each edge contributes 2 to the summation (because an edge is incident on exactly two distinct vertices).

 

Constructive Proofs

This technique not only shows the existence of a certain object, it actually gives a method of creating it. Here is how a constructive proof looks like:

Theorem 4: There exists an object with property Ρ.

Proof. Here is the object: […]

And here is the proof that the object satisfies property Ρ: […]

Here is an example of a constructive proof. A graph is called 3-regular,  if each vertex has degree three.

 

Theorem 5: For every even integer n ≥ 4, there exists a 3-regular graph with n vertices.

Proof. Define

V = {0,1,2,3,….,n – 1},

and

E = { {i,i+1}: 0 ≤ i ≤ n – 2 } ∪ {{n-1,0}} ∪ {{i,i+n/2} : 0 ≤ i ≤ n/2 – 1 }.

Then the graph G = (V, E)  is 3-regular.

Convince yourself that this graph is indeed 3-regular. It may help to draw the graph for , say , n = 8 .

 

Nonconstructive proofs

In a nonconstructive proof, we show that a certain object exists, without actually creating it. Here is an example of such a proof:

Theorem 6: There exist irrational numbers x and y such that xy is rational.

Proof. There are two possible cases.

Case 1: √2√2 ∈ Q .

In this case, we take x = y = √2. In Theorem 9 Part 2 of this article, we will prove that √2 is irrational.

Case 2: √2√2 ∉ Q.

In this case, we take x = √2√2 and y = √2. Since

xy = (√2√2)√2 = √22 = 2,

the claim in the theorem follows.

Observe that this proof indeed proves the theorem, but it does not give an example of a pair of irrational number and x and y such that xy is rational.

 

Read Also: Mathematical Preliminaries of Theory of Computation

 

 

The post Proof Techniques Mathematical Preliminaries Part 1 appeared first on .

]]>
255
Mathematical Preliminaries of Theory of Computation https://www.theoryofcomputation.co/mathematical-preliminaries-of-theory-of-computation/ Sun, 23 Sep 2018 11:57:16 +0000 https://www.theoryofcomputation.in/?p=221 Theory of computation or computer science is the version evolved from the mathematics set theory. We have discussed many things so far in this blog website. During answering many questions of the future engineers. We come across that many of them required to understand the mathematical part of the theory of computation. Mathematical preliminaries A...

The post Mathematical Preliminaries of Theory of Computation appeared first on .

]]>
Theory of computation or computer science is the version evolved from the mathematics set theory. We have discussed many things so far in this blog website.

During answering many questions of the future engineers. We come across that many of them required to understand the mathematical part of the theory of computation.

Mathematical preliminaries

  1. A set is a collection of well-defined objects. Examples are (i) the set of all Dutch Olympic Gold Medallists, (ii) the set of all pubs in Ottawa,and (iii) the set of all even natural numbers.
  2. The set of natural numbers is N = {1, 2, 3, . . .}.
  3. The set of integers is Z = {. . . ,−3,−2,−1, 0, 1, 2, 3, . . .}.
  4. The set of rational numbers is Q = {m/n : m  ∈ Z, n ∈ Z, n ≠ 0}.
  5. The set of real numbers is denoted by R.
  6. If A and B are sets, then A is a subset of B, written as A ⊆ B, if every element of A is also an element of B. For example, the set of even natural numbers is a subset of the set of all natural numbers. Every set A is a subset of itself, i.e., A ⊆ A. The empty set is a subset of every set A, i.e. ∅ ⊆ A.
  7. If B is a set, then the power set P(B) of B is defined to be the set of all subsets of B: P(B)  = { A:A⊆ B }. Observe that  ∅ ⊆ P(B) and B ∈ P(B).
  8. If A and B are two sets, then
    • there union is defined as A ∪ B = { x : x ∈ A or x ∈ B },
    • their intersections is defined as A ∩ B = { x : x ∈ A and x ∈ B }
    • their difference is defined as A \ B  = {x:  x ∈ A and x ∉ B }
    • the Cartesian product of A and B is defined as A x B = { (x,y): x ∈ A and y ∈ B  }
    • the complement of A  is defined as Ā = { x : x  ∉ A }
  9. A binary relation on two sets A and B is subset of A x B.
  10. A function ƒ from A to B, denoted by ƒ: A  B, is a binary relation R, having the property that for each element a ∈ A, there is exactly one ordered payer in R, whose first element is a. We will also say that ƒ(a) = b,or ƒ maps a to b, or the image of under ƒ is b.  The set is called the domain of ƒ, and the set { ∈ B : there is an with  ƒ(a) = b } is called the range  of ƒ.
  11. A function ƒ: A is one-to-one or injective, if for any two distinct elements a and a’ in A, we have ƒ(a) ≠ ƒ(a’). The function ƒ is  onto or surjectiveif for each element B,there exists an element  A, such that ƒ(a) = b; in other words, the range of ƒ is equal to the set of B. A function ƒ is a bijection, if ƒ is both injective and surjective.
  12. A binary relation R ⊆ A x A is an equivalence relation, if it satisfies the following three conditions:
    • R is reflexive: For every element in A, we have (a,a) ∈ R.
    • R is symmetric: For all a and b in A, if (a,b) ∈ R , then also (b,a) ∈ R.
    • R is transitive: For all a, b, and c in A, if (a,b) ∈ R and (b,c) ∈ R then also (a,c) ∈ R.
  13. graft G = (V, E) is a pair of consisting of a set V, whose elements are called vertices, and a set E, where each element of E is a pair of distinct vertices. The elements of E are called edges. The figure below shows some well-known graphs: K5 (the complete graph on five vertices), K3,3(the complete bipartite graph on 2×3 = 6 vertices), and the Peterson graph.Mathematical Preliminaries Types of GraphThe degree of a vertex denoted by deg(v), is defined to be the number of edges that are incident on v. A path in a graph is a sequence of vertices that are connected by edges. A path is a cycle, if it starts and ends at the same vertex. A simple path is a path without any repeated vertices. A graph is connected, if there is a path between every pair of vertices.
  14. In the context of strings, an alphabet is a finite set, whose elements are called symbols. Examples of alphabets are Σ = {0,1} and Σ = {a,b,c,……,z}.
  15. string over an alphabet Σ is a finite sequence of symbols, where each symbol is an element of Σ. The length of a string , denoted by |w|, is the number of symbols contained in w. The empty string, denoted by ε, is the string having length zero. For example, if the alphabet Σ is equal to {0,1}, then 10, 001, 0, 101, and ε are strings over Σ, having lengths 2, 3, 1, 3, and 0, respectively.
  16. language is a set of strings.
  17. The Boolean values are 1 and 0, that represent true and false, respectively. The basic Boolean operations include
    • negation (or NOT), represented by ¬,
    • conjunction (or AND), represented by ∧,
    • disjunction (or  OR), represented by ∨,
    • exclusive-or (or XOR), represented by ⊕,
    • equivalence, represented  by ↔ or ⇔,
    • implication, represented by → or ⇒.
  18. The following table explain the meanings of the boolean operation discussed above.

Mathematical Preliminaries - Boolean Operation

Read Also: What is Machine Learning?

The post Mathematical Preliminaries of Theory of Computation appeared first on .

]]>
221