Introduction to Algorithms

Introduction to Algorithms

An algorithm is a step-by-step instruction to solve a given problem efficiently for a given set of inputs. It is also viewed as a tool for solving well-defined computational problems or a set of steps that transform the input into the output. Algorithms are language-independent and are said to be correct only if every input instance produces the correct output.

The Instance of the Problem

The input of the algorithm is called an instance of the problem, which should satisfy the constraints imposed on the problem statement.

How to Choose the Best Encryption Methods for Databases

Introduction

Encryption is the process of encoding messages or information so that only authorized parties can see it. Encryption has been going on for centuries. For example, in World War II Allied forces were sending out encrypted codes using the unwritten Navajo language, which was impossible for the Japanese to decode.

Today encryption is even more important because we live in an era where privacy and security are constantly under attack from hackers who want access into our personal lives. Thanks to modern technology like AES encryption, there's no reason why hackers should read sensitive information.

Raft in Tarantool: How It Works and How to Use It

Last year, we introduced synchronous replication in Tarantool. We followed the Raft algorithm in the process. The task consisted of two major phases: so-called quorum writing (i.e., synchronous replication) and automated leader election.

Synchronous replication was first introduced in release 2.5.1, while release 2.6.1 brought the support of Raft-based automated leader election.

Technology Bridging the Gap Between CNC Machines & Robots

Having different software languages can create a communication barrier between robots and the CNC machines they assist. Digital factories can be transformed once the two are synced, and technology is bridging the gap to make it happen. 

As Industry 4.0 revolutionizes the manufacturing world, robots can be increasingly seen working alongside CNC machines - but only so well. The controllers used by robotics manufacturers rarely coincide with the software that makes CNC machines run, so a fully synchronized operation can be very difficult to achieve. The result is untapped potential in automated manufacturing, as robot-CNC machine interfaces work with less productivity than they could otherwise obtain. 

The Importance of Defining Fairness for Decision-Making AI Models

Defining fairness is a problematic task. The definition depends heavily on context and culture and when it comes to algorithms, every problem is unique so will be solved through the use of unique datasets. Algorithmic fairness can stem from statistical and mathematical definitions and even legal definitions of the problem at hand. Furthermore, if we build models based on different definitions of fairness for the same purpose, they will produce entirely different outcomes. 

The measure of fairness also changes with each use case. AI for credit scoring is entirely different from customer segmentation for marketing efforts, for example. In short, it’s tough to land on a catch-all definition, but for the purpose of this article, I thought I’d make the following attempt: An algorithm has fairness if it does not produce unfair outcomes for, or representations of, individuals or groups.

Why Fairer AI Is Essential For Long-Term Survival

Introduction

In my most recent post, I covered some areas that I hope to see evolve in the next year and beyond. How we can do more with data across industries is, of course, an important consideration for data scientists, businesses, and society as a whole, as better models lead to improved products and services. 

When machine learning models for cancer diagnoses show promise, we naturally rally around this positive step and rejoice in the vision of a brighter future because it’s a victory that touches us all in some way. But there are many other ways AI can and must be used for good in the world, and in my next few posts, I want to use a financial services example that affects all of us, to show how that can be achieved. 

DFS vs. BFS: What Is the Difference?

As a computer science student, I know how important it is to understand tree traversal algorithms. I suggest every beginner should clarify the basic differences between these two algorithms.

Breadth-first search (BFS) and depth-first search (DFS) are the most popular tree traversal algorithms. Both techniques include visiting all the edges and vertices of a graph but the most important difference between them is that they perform different data structures. BFS applies queue data structure and DFS applies the stack data structure. Depending on this difference, we can determine between the two methods which one is appropriate for a particular purpose.

CMS Deprecated. Next Steps?

The popular Concurrent Mark Sweep (CMS) GC algorithm is deprecated in JDK 9. According to JEP-291, this decision has been made to reduce the maintenance burden of the GC code base and accelerate new development.

Thus, from Java 9 onwards, if you launch the application with -XX:+UseConcMarkSweepGC (an argument which will activate the CMS GC algorithm), you are going to see below WARNING message:

Diffie Hellman Key Exchange

In early 70’s to send a secret message, both parties (sender and receiver) had to exchange the key to encrypt and decrypt the message. Exchanging the secret key may lead to compromising the security, as while exchange this key if someone intercepted the secret key then the interceptor can decrypt all messages. This problem is called the key exchange problem in computer science. 

The key exchange problem is not just limited to communication but also arises in network communication. To solve key exchange problems, Whitfield Diffie and Martin Hellman presented the Diffie-Hellman Key Exchange algorithm in 1976. 

What You Need To Know About pBFT Consensus

For many, blockchain is a fairly new technology whose applications have yet to be explored. Despite this, it is difficult to find an area in which blockchain and a distributed ledger could not be applied. For example, IoT networks of smart devices can make it possible to create cost-efficient, fully networked, and secure smart cities using the blockchain.

Distributed ledger technologies solve a plethora of problems, including increased privacy, enhanced trust in the network, increased speed, and reduced cost of transactions.

A Covert Channel Over the Telegram

We used to think of Telegram as a reliable and secure transmission medium for messages of any sort. But under the hood, it has a rather common combination of a- and symmetric encryptions. Where’s fun in that? And why would anyone trust their messages to the third-party anyway?

Covert Channels

There are many workarounds to transmit data between two users avoiding direct contact. You can use middlemen, crypto-, and steganography methods, broadcasting relay networks, and other extensions of existing protocols. But sometimes, it’s useful being able to establish secure contact using only officially documented features. Or, as one should say, set up a covert channel.