To deduce new statements from the statements whose truth that we already know, Rules of Inference are used.What are Rules of Inference for?Mathematical logic is often used for logical proofs. Proofs are valid arguments that determine the truth values of mathematical statements.An argument is a sequence of statements. The last statement is the conclusion and all its preceding statements are called premises (or hypothesis). The symbol “$\therefore$”, (read therefore) is placed before the conclusion. A valid argument is one where the conclusion follows from the truth values of the premises.Rules of Inference provide the templates or guidelines for constructing valid ... Read More
Let us first create a table −mysql> create table DemoTable679(FirstName varchar(100)); Query OK, 0 rows affected (0.44 sec)Insert some records in the table using insert command −mysql> insert into DemoTable679 values('John'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable679 values('Chris'); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable679 values('David'); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTable679 values('Bob'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable679 values('Mike'); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable679 values('Sam'); Query OK, 1 row affected (0.15 sec) mysql> insert ... Read More
If G = (V, E) be a non-directed graph with vertices V = {V1, V2, …Vn} thenn ∑ i=1 deg(Vi) = 2|E|Corollary 1If G = (V, E) be a directed graph with vertices V = {V1, V2, …Vn}, thenn ∑ i=1 deg+(Vi) = |E| = n ∑ i=1 deg−(Vi)Corollary 2In any non-directed graph, the number of vertices with Odd degree is Even.Corollary 3In a non-directed graph, if the degree of each vertex is k, thenk|V| = 2|E|Corollary 4In a non-directed graph, if the degree of each vertex is at least k, thenk|V| = 2|E|Corollary 5In a non-directed graph, if the ... Read More
For this, use ORDER BY STR_TO_DATE in MySQL as in the below syntax −select *from yourTableName ORDER BY STR_TO_DATE(yourColumnName, '%M %Y') DESC;Let us first create a table −mysql> create table DemoTable678(DueDate varchar(200)); Query OK, 0 rows affected (0.62 sec)Insert some records in the table using insert command. We have inserted dates here −mysql> insert into DemoTable678 values('March 2019'); Query OK, 1 row affected (0.12 sec) mysql> insert into DemoTable678 values('November 2018'); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable678 values('January 2019'); Query OK, 1 row affected (0.18 sec)Display all records from the table using select statement −mysql> ... Read More
German mathematician G. Cantor introduced the concept of sets. He had defined a set as a collection of definite and distinguishable objects selected by the means of certain rules or descriptions.Set theory forms the basis of several other fields of study like counting theory, relations, graph theory, and finite state machines. In this chapter, we will cover the different aspects of Set Theory.Set - DefinitionA set is an unordered collection of different elements. A set can be written explicitly by listing its elements using a set bracket. If the order of the elements is changed or any element of a ... Read More
To set custom field value, use FIND_IN_SET(). Let us first create a table −mysql> create table DemoTable677( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserStatus text ); Query OK, 0 rows affected (1.07 sec)Insert some records in the table using insert command −mysql> insert into DemoTable677(UserStatus) values('BUSY'); Query OK, 1 row affected (0.23 sec) mysql> insert into DemoTable677(UserStatus) values('AT WORK'); Query OK, 1 row affected (0.17 sec) mysql> insert into DemoTable677(UserStatus) values('OFFLINE'); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable677(UserStatus) values('BLOCKED'); Query OK, 1 row affected (0.17 sec)Display all records from the table using select ... Read More
Venn diagram, invented in 1880 by John Venn, is a schematic diagram that shows all possible logical relations between different mathematical sets.ExamplesSet OperationsSet Operations include Set Union, Set Intersection, Set Difference, Complement of Set, and Cartesian Product.Set UnionThe union of sets A and B (denoted by A ∪ B) is the set of elements that are in A, in B, or in both A and B. Hence, A ∪ B = { x | x ∈ A OR x ∈ B }.Example − If A = { 10, 11, 12, 13 } and B = { 13, 14, 15 }, ... Read More
The CONCAT() method would be used to concatenate “MR” to every string, whereas GROUP_CONCAT() to concatenate some of the column values in a single line.Let us first see an example and create a table −mysql> create table DemoTable799( UserId int, UserName varchar(100), UserAge int ); Query OK, 0 rows affected (0.56 sec)Insert some records in the table using insert command −mysql> insert into DemoTable799 values(101, 'John', 21); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable799 values(102, 'Chris', 26); Query OK, 1 row affected (0.22 sec) mysql> insert into DemoTable799 values(101, 'Robert', 23); Query OK, ... Read More
To deduce new statements from the statements whose truth that we already know, Rules of Inference are used.What are Rules of Inference for?Mathematical logic is often used for logical proofs. Proofs are valid arguments that determine the truth values of mathematical statements.An argument is a sequence of statements. The last statement is the conclusion and all its preceding statements are called premises (or hypothesis). The symbol “∴”, (read therefore) is placed before the conclusion. A valid argument is one where the conclusion follows from the truth values of the premises.Rules of Inference provide the templates or guidelines for constructing valid ... Read More
Let us first create a table −mysql> create table DemoTable676( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, Number int ); Query OK, 0 rows affected (0.50 sec)Insert some records in the table using insert command −mysql> insert into DemoTable676(Number) values(1000); Query OK, 1 row affected (0.23 sec) mysql> insert into DemoTable676(Number) values(1839); Query OK, 1 row affected (0.20 sec) mysql> insert into DemoTable676(Number) values(29894); Query OK, 1 row affected (0.30 sec) mysql> insert into DemoTable676(Number) values(1264); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable676(Number) values(190); Query OK, 1 row affected (0.17 sec) mysql> insert into ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP