Category Archives: Q&A

Hot Topics in Computer Science

AI-governance-lead

Some latest hot topics in Computer Science:

  • Data Warehousing
  • Internet of Things(IoT)
  • Big Data
  • Cloud Computing
  • Semantic Web
  • MANET
  • Machine Learning
  • Artificial Intelligence
  • Data Mining
  • Image Processing
  • Bioinformatics
  • Quantum Computing

Data Warehousing

Data Warehousing is the process of analyzing data for business purposes. Data warehouse store integrated data from multiple sources at a single place which can later be retrieved for making reports. The data warehouse in simple terms is a type of database different and kept isolated from organization’s run-time database. The data in the warehouse is historical data which is helpful in understanding business goals and make decisions for future prospects. It is a relatively new concept and have high growth in future. Data Warehouse provides Online Analytical Processing(OLAP) tools for the systematic and effective study of data in a multidimensional view. Data Warehouse finds its application in the following areas:

  • Financial Sector
  • Banking Sector
  • Retail Services
  • Consumer goods
  • Manufacturing

Internet of Things(IoT)

Internet of Things(IoT) is a concept of interconnection of various devices, a vehicle to the internet. IOT make use of actuators and sensors for transferring data to and from the devices. This technology is developed for better efficiency and accuracy apart from minimizing human interaction with the devices. The example for this is the traffic lights which changes its colors depending upon the traffic. Following are the application areas of Internet of Things(IoT):

  • Home Automation
  • Healthcare
  • Agriculture
  • Transportation
  • Manufacturing
  • Environment

Big Data

Big Data is a term to denote the large volume of data which is complex to handle. The data may be structured or unstructured. Structured data is an organized data while unstructured data is an unorganized data. The definition of big data is termed in terms of three Vs. These vs are:

  • Volume: Volume defines large volume of data from different sources
  • Velocity: It refers to the speed with which the data is generated
  • Variety: It refers to the varied amount of data both structured and unstructured.

 

Application areas:

  • Government
  • Healthcare
  • Education
  • Finance
  • Manufacturing
  • Media
  • Sports

Cloud Computing

 

Cloud Computing is a comparatively new technology. It is an internet-based service that creates a shared pool of resources for consumers. There are three service models of cloud computing namely:

  • Software as a Service(SaaS)
  • Platform as a Service(PaaS)
  • Infrastructure as a Service(IaaS)

Characteristics of cloud computing are:

  • On-demand self-service
  • Broad network access
  • Shared pool of resources
  • Scalability
  • Measured service

Semantic Web

Semantic Web is also referred to as Web 3.0 and is the next big thing in the field of communication. It is standardized by World Wide Web Consortium(W3C) to promote common data formats and exchange protocols over the web. It is machine-readable information based and is built on XML technology. It is an extension to Web 2.0. In the semantic web, the information is well defined to enable better cooperation between the computers and the people. In the semantic web, the data is interlinked for better understanding. It is different from traditional data sharing technologies.

MANET

MANET stands for mobile ad hoc network. It is an infrastructure-less network with mobile devices connected wirelessly and is self-configuring. It can change locations independently and can link to other devices through a wireless connection. Following are the various types of MANETS:

  • Vehicular ad hoc network(VANET)
  • Smartphone ad-hoc network(SPANET)
  • Internet-based mobile ad hoc network(iMANET)

various simulation tools to study the functionality and working of MANET like OPNET, NETSIM, NS3 etc.

In MANET there is no need of central hub to receive and send messages. Instead, the nodes directly send packets to each other.

MANET finds its applications in the following areas:

  • Environment sensors
  • Healthcare
  • Vehicular ad hoc communication
  • Road Safety
  • Home

Machine Learning

It is also a relatively new concept in the field of computer science and is a technique of guiding computers to act in a certain way without programming. It makes use of certain complex algorithms to receive an input and predict an output for the same. There are three types of learning;

  • Supervised learning
  • Unsupervised learning
  • Reinforcement learning

Machine Learning is closely related to statistics.

shutterstock_561931702

Data Mining

Data Mining is the process of identifying and establishing a relationship between large datasets for finding a solution to a problem through analysis of data. There are various tools and techniques in Data Mining which gives enterprises and organizations the ability to predict futuristic trends. Data Mining finds its application in various areas of research, statistics, genetics, and marketing. Following are the main techniques used in the process of Data Mining:

  • Decision Trees
  • Genetic Algorithm
  • Induction method
  • Artificial Neural Network
  • Association
  • Clustering

Advantages of Data Mining

  • Data Mining helps marketing and retail enterprises to study customer behavior.
  • Organizations into banking and finance business can get information about customer’s historical data and financial activities.
  • Data Mining help manufacturing units to detect faults in operational parameters.
  • Data Mining also helps various governmental agencies to track record of financial activities to curb on criminal activities.

Disadvantages of Data Mining

  • Privacy Issues
  • Security Issues
  • Information extracted from data mining can be misused

Artificial Intelligence

Artificial Intelligence is the intelligence shown by machines and it deals with the study and creation of intelligent systems that can think and act like human beings. In Artificial Intelligence, intelligent agents are studied that can perceive its environment and take actions according to its surrounding environment.

Goals of Artificial Intelligence

Following are the main goals of Artificial Intelligence:

  • Creation of expert systems
  • Implementation of human intelligence in machines
  • Problem-solving through reasoning

Application of Artificial Intelligence

Following are the main applications of Artificial Intelligence:

  • Expert Systems
  • Natural Language Processing
  • Artificial Neural Networks
  • Robotics
  • Fuzzy Logic Systems

Strong AI – It is a type of artificial intelligence system with human thinking capabilities and can find a solution to an unfamiliar task.

Weak AI – It is a type of artificial intelligence system specifically designed for a particular task. Apple’s Siri is an example of Weak AI.

Turing Test is used to check whether a system is intelligent or not. Machine Learning is a part of Artificial Intelligence. Following are the types of agents in Artificial Intelligence systems:

  • Model-Based Reflex Agents
  • Goal-Based Agents
  • Utility-Based Agents
  • Simple Reflex Agents

Natural Language Processing – It is a method to communicate with the intelligent systems using human language. It is required to make intelligent systems work according to your instructions. There are two processes under Natural Language Processing – Natural Language Understanding, Natural Language Generation.

Natural Language Understanding involves creating useful representations from the natural language. Natural Language Generation involves steps like Lexical Analysis, Syntactic Analysis, Semantic Analysis, Integration and Pragmatic Analysis to generate meaningful information.

Image Processing

Image Processing is another field in Computer Science and a popular topic for a thesis in Computer Science. There are two types of image processing – Analog and Digital Image Processing. Digital Image Processing is the process of performing operations on digital images using computer-based algorithms to alter its features for enhancement or for other effects. Through Image Processing, essential information can be extracted from digital images. It is an important area of research in computer science. The techniques involved in image processing include transformation, classification, pattern recognition, filtering, image restoration and various other processes and techniques.

Main purpose of Image Processing

Following are the main purposes of image processing:

  • Visualization
  • Image Restoration
  • Image Retrieval
  • Pattern Measurement
  • Image Recognition

Applications of Image Processing

Following are the main applications of Image Processing:

  • UV Imaging, Gamma Ray Imaging and CT scan in medical field
  • Transmission and encoding
  • Robot Vision
  • Color Processing
  • Pattern Recognition
  • Video Processing

Bioinformatics

Bioinformatics is a field that uses various computational methods and software tools to analyze the biological data. In simple words, bioinformatics is the field that uses computer programming for biological studies. This field is a combination of computer science, biology, statistics, and mathematics. It uses image and signal processing techniques to extract useful information from a large amount of data. Following are the main applications of bioinformatics:

  • It helps in observing mutations in the field of genetics
  • It plays an important role in text mining and organization of biological data
  • It helps to study the various aspects of genes like protein expression and regulation
  • Genetic data can be compared using bioinformatics which will help in understanding molecular biology
  • Simulation and modeling of DNA, RNA, and proteins can be done using bioinformatics tools

Quantum Computing

Quantum Computing is a computing technique in which computers known as quantum computers use the laws of quantum mechanics for processing information. Quantum Computers are different from digital electronic computers in the sense that these computers use quantum bits known as qubits for processing. A lot of experiments are being conducted to build a powerful quantum computer. Once developed, these computers will be able to solve complex computational problems which cannot be solved by classical computers.

Quantum Computers work on quantum algorithms like Simon’s algorithm to solve problems. Quantum Computing finds its application in the following areas:

  • Medicines
  • Logistics
  • Finance
  • Artificial Intelligence

Java program to check whether given number is a multiple of 3 or not

Given an integer n, check whether it is a multiple of 3 or not. If the number is divisible by 3, then return true else return false.

Constraints

1 <= n <= 10000

import java.io.*;
import java.util.*;
import java.math.*;
public class CandidateCode {
  public static boolean threeByThree(int input1){
 if(input1%3==0)
 return true;
 return false;
 }
 public static void main(String[] args) throws IOException{
 Scanner in = new Scanner(System.in);
 boolean output;
 int ip1 = Integer.parseInt(in.nextLine().trim());
 output = threeByThree(ip1);
 System.out.println(String.valueOf(output ? 1 : 0));
 }
}

Find sum of series 1+2+8+26+80+…….+n

we can not define 1+2+8+26+80+………. series in a simple manner to write  program.

But…..

2,8,26,80,242……………..can be define as below

The way to discover the next term is multiply the next number by 2 and then add it on.

i.e. the next number of 2 is 3

so, 3*2=6+2=8

9*2=18+8=26

27*2=54+26=80…….. and so on

            OR

Far more simply multiply the number by 3 and add 2

So,

2 * 3 + 2 = 8;

8 * 3 + 2 = 28

26 *3 + 2 = 80

80 *3 + 2 = 242. and so on

next_term=3*last_term+2

Now for finding the sum of the given series and add 1 with sum of this  series.

C language implementation

 

// C program to add 1+2+8+26+80+…….+n
//Author: Sani Kamal
//Date: 04-Oct-17

#include<stdio.h>

int main(){

int n,temp=0,i,sum=0,hold=0;
 printf("How many term");
 scanf("%d",&n);
 for(i=0;i<n-1;i++){
 temp =3*hold+2;
 hold=temp;
 sum +=hold;
 }
 printf("sum=%d\n",sum+1);
}

Java language implementation

import java.util.Scanner;

/**
 * Java program to add 1+2+8+26+80+.......+n
 *
 * @author Sani Kamal
 */
public class SeriesSum {

public static void main(String[] args) {
 Scanner input = new Scanner(System.in);
 System.out.print("How many term?");
 int n = input.nextInt();
 int temp, hold = 0, sum = 0;
 for (int i = 0; i < n - 1; i++) {
 temp = 3 * hold + 2;
 hold = temp;
 sum += hold;

}
 System.out.println("Sum=" + (sum+1));

}

}

 

Python language implementation

# Python program to add 1+2+8+26+80+.......+n
# Author: Sani Kamal
# Date: 04-Oct-17

num = int(input("How many term?"))
hold = 0
sum=0
for i in range(0, num - 1):
    temp = 3 * hold + 2
    hold = temp
    sum += hold
print(sum + 1)

Basic C programs (must do practice set)

  1. C program to find area and circumference of circle.
  2. C program to find simple interest.
  3. C program to convert temperature from degree centigrade to fahrenheit .
  4. C program to calculate sum of 5 subjects and find percentage.
  5. C program to swap two number without using third variable.
  6. C program to reverse a given number.
  7. C program to find greatest in three numbers.
  8. C program to show the use of conditional operator.
  9. C program to find that entered year is leap year or not.
  10. C program to find whether given no. is even or odd.
  11. C program to shift inputed data by two bits to the left.
  12. C program to use switch statement. Display Sunday to Saturday.
  13. C program to display arithmetic operator using switch case.
  14. C program to display first 10 natural no. and their sum.
  15. C program to print star.
  16. C program to print star part 2.
  17. C program to print star part 3.
  18. C program to print fibonacci series up to n.
  19. C program to find factorial of a number.
  20. C program to find whether given number is a prime number or not.
  21. C program to display sum of series 1+1/2+1/3+………+1/n.
  22. C program to display series and find sum of 1+3+5+……+n.
  23. C program to use bitwise AND operator between the two integers.
  24. C program to add two number using pointers.
  25. C program to show sum of n elements of array and show the average.
  26. C program to find maximum number in an array.
  27. C program to display a matrix.
  28. C program to find sum of two matrices.
  29. C program to find subtraction of two matrices.
  30. C program to find multiplication of two matrices.
  31. C program to find transpose of a matrix.
  32. C program to find maximum number in an array using pointer.
  33. C program to show input and output of a string.
  34. C program to find square of a number using functions.
  35. C program to swap two numbers using functions.
  36. C program to find factorial of a number using functions.
  37. C program to show table of a number using functions.
  38. C program to show call by value.
  39. C program to show call by reference.
  40. C program to find largest of two number using function.
  41. C program to find factorial of a number using recursion.
  42. C program to find whether a string is palindrome or not.
  43. File operations C program.
  44. Merging one dimensional array -Excluding The Repeating Element.
  45. C program to find number of occurrences of vowels ,consonants,words,spaces and special character in the given statement.
  46. C program to create enumerated datatype for 12 months. Display their values in integer constants.
  47. C program to evaluate  the equation y=xn where n in non negative integer.
  48. C program to print the multiplication table from 1*1 to 16*10.
  49. Program uses a for loop to print the powers of 2 table for the power 0 to 20, both positive and negative.
  50. A class of  n students take an annual examination in m subjects. A program to read the marks obtained by each student in various subjects and to compute and print the total marks obtained by each of them.
  51. C program to illustrates the use of break statement.
  52. C program to evaluate the series 1/1-x=1+x+ x^2+x^3+……+x^n.
  53. C program to illustrates the use of continue statement.
  54. C program to print binomial coefficient table.
  55. C program to draw a histogram.
  56. C program to illustrate minimum cost problem.
  57. C program for sorting the elements of an array in descending order.
  58. C program to finding  the largest number of an array.
  59. C program for removing the duplicate element in an array.
  60. C program for finding the desired  k-th smallest element in an array.
  61. C program to sort a list of numbers and determine median.
  62. C program to calculate standard deviation.
  63. C program to evaluate responses to a multiple choice test.
  64. C program for production  and sales analysis.
  65. C program to read a series of words from a  terminal using scanf function.
  66. C program to read a line of text from terminal.
  67. C program to copy one string into another string and count the number of characters copied.
  68. C program for printing of the alphabet set in decimal and character format.
  69. C program to concatenation of strings.
  70. C program to illustration of string handling functions.
  71. C program to sort a list of names in alphabetical order.
  72. C program for counting of characters ,words and lines in a text.
  73. C program to alphabetize a student list.
  74. C program for functions with no arguments and no return values.
  75. C program for functions with arguments but no return values.
  76. C program for functions with arguments and return values.
  77. Write a function power that computes x raised to the power y for integers x and y and return double type value.
  78. C program to show how user-defined function is called.
  79. C program to define user-defined function. Call them at different places.
  80. C program to show how similar variables names can be used in different functions.
  81. C program to show effect of global variables in different functions.
  82. C program to display message using user-defined function.
  83. C program to return more than one value from user defined function.
  84. C program to pass arguments to user-defined function by value and by reference.
  85. C program to return only absolute value like abs() function.
  86. C program to calculate square and cube of an entered number. Use function as an argument.
  87. C program to assign return value of a function to another variable.
  88. C program to use %(mod) with function.
  89. C program to evaluate the equation s=sqrt(a()+b()) using function.
  90. C program to call user-defined function through if statement.
  91. C program to call user-defined fucntion through switch statement.
  92. C program to call function through the for loop.

 

What are the Common design Algorithmic Paradigms ?

1.Divide and conquer : Recursively breaking down a problem into two or more sub-problems of the same (or related) type.
2.Dynamic programming : breaking it down into a collection of simpler subproblems. Example: Tower of Hanoi puzzle
3.Greedy algorithm : the problem solving heuristic of making the locally optimal choice at each stage. Example: traveling salesman problem
4.Backtracking : is a general algorithm for finding all (or some) solutions to some computational problems Example: Sudoku puzzle solved by backtracking.
5.Brute Force : a very general problem-solving technique that consists of systematically enumerating all possible candidates for the solution and checking whether each candidate satisfies the problem’s statement.