Sunday, April 13, 2025

Meera's Vigil


The wind howled around Trikut Parbat's peaks, a constant, mournful cry that mirrored the turmoil in Meera's heart. She stood at the edge of the research camp, the abandoned equipment stark against the twilight. The others had left, their faces etched with fear and confusion, but Meera remained. This mountain held secrets, and she wouldn't abandon them.

She remembered Professor Mattoo's warnings, his tales of the river's ancient power, a power she felt thrumming beneath her feet. The NeuroSync technology, meant to bridge minds, had instead opened a door to something else, something alien and hungry.

Meera was a scientist, not a soldier, but she possessed a quiet determination. She studied Mattoo's research, the fragmented notes he'd left behind. The key, she believed, lay in understanding the signals, the invasive song the aliens had used to infiltrate their minds.

Days turned into weeks. Meera rationed her supplies, her focus unwavering. She learned to navigate the mountain's treacherous paths, the three peaks becoming her silent companions. Sometimes, in the stillness of the night, she thought she heard whispers, echoes of a consciousness not human, not entirely alive.

One evening, she found a hidden cave, its walls pulsating with a faint, orange light. Inside, she discovered a chamber filled with strange symbols and crystalline structures that hummed with energy. It was a nexus, a place where the alien signal was strongest.

Meera knew she was close to the truth, a truth that could save humanity or destroy it. She activated her modified NeuroSync device, not to connect, but to listen, to understand. The whispers intensified, coalescing into a coherent voice, ancient and vast. It spoke of survival, of a dying world, and of a desperate need to find a new home.

Meera wasn't afraid. She was ready to listen.


https://www.amazon.in/Trikut-Parbat-NeuroSync-Jaimal-Singh-ebook/dp/B0F19DVCMF

Echoes of Trikut Parbat

 The rain didn't wash away the unease. Weeks had passed since Severian left Trikut Parbat, but the visions lingered, sharper now, as if the mountain itself were trying to pull him back. He saw the arachnid's metallic glint in every shadow, heard the aliens' cold whispers in the city's cacophony.

Tonight, the whispers were louder. He found himself drawn to the familiar decay of Sector 7, the neon signs reflecting in rain-slicked streets, mirroring the distorted reality he'd experienced. A beggar, huddled in a doorway, looked up, his eyes gleaming with an unnatural orange light.

"They're calling you back, Severian," the beggar rasped, his voice a chorus of alien echoes. "They are almost here."

Severian's hand instinctively went to where his weapon used to be. He was no longer a soldier, but the training was etched into his bones. "Who's calling?"

The beggar smiled, a disturbing, knowing smile. "The ones who endured. The ones who wait beneath the mountain. They have a new song for NeuroSync, a song of dominance."

Suddenly, the ground trembled. A high-pitched whine pierced the air, growing in intensity. From the যেন of a half-collapsed building, a beam of orange light shot skyward, tearing through the rain clouds. Other beams erupted across the city, converging on Trikut Parbat in the distance, as if the mountain were a beacon.

Severian knew, with a chilling certainty, that this was not the end, but an echo. The NeuroSync Dominion was far from over.


https://www.amazon.in/Trikut-Parbat-NeuroSync-Jaimal-Singh-ebook/dp/B0F19DVCMF

Trikut Parbat: A Journey into Shadow and Mystery

 Jaimal Singh's "Trikut Parbat: The NeuroSync Dominion" is a gripping science fiction thriller that pulls you into a world of dark mysteries and looming threats. The story follows Severian Vikram, a soldier haunted by his past, as he becomes entangled in a web of conspiracy surrounding the enigmatic Trikut Parbat.

Singh masterfully creates a compelling atmosphere, blending gritty, neon-lit cityscapes with the imposing, almost supernatural presence of the titular mountain. The narrative unfolds with a measured pace, drawing you deeper into Severian's world.

The book explores themes of trauma, the search for meaning, and the potential dangers of advanced technology. It raises questions about the nature of reality and the unseen forces that may be shaping our world. If you enjoy science fiction that blends action with philosophical introspection, "Trikut Parbat" is a journey worth taking.


https://www.amazon.in/Trikut-Parbat-NeuroSync-Jaimal-Singh-ebook/dp/B0F19DVCMF 

Monday, August 8, 2011

Algorithms : Divide and Conquer

A divide and conquer algorithm repeatedly reduces an instance of a problem to one or more smaller instances of the same problem until the instances are small enough to solve easily.





Equal number of nuts and bolts of various sizes are given. There is a match for every bolt in the set of the nuts. Comparisom of a bolt with a bolt and a nut with a nut is prohibited. How to make ut bolt pairs in shortest possible time?

We can use divide and conquer here. We cannot sort only nuts ( only bolts ) according to size because nut-nut (bolt-bolt ) comparison is prohibited.

So we try to match a nut with bolts. Three conditions arise :
a. Its a match.
b. Bolt is smaller.
c. Bolt is bigger.

Now we can divide bolts in two parts: smaller ones and bigger ones. The matching nut-bolt (pivot elements) are the first match.


Now try to match the pivot bolt with remaining nuts. Two conditions arise :
a. Nut is smaller.
b. Nut is bigger.

Now we can divide nuts in two parts: smaller ones and the bigger ones.


The set of smaller nuts have a match in the set of smaller bolts and vice versa.


So after ~2n (assuming n nuts and n bolts) comparisons the bigger problem is divided into 2 smaller problems of half size (~ n/2).


Hence the time complexity is:

T(n)= T(n/2)+ O(n) ~ O(n lg n).

Tuesday, August 2, 2011

Simple Algorithms - Find duplicates in a list

Let's take an array of n integers. No integer repeats itself except one.

Given:
a. If n is even then the repeating
integer is repeated n/2 times. ( That is count of repeating integer is equal to the count of non repeating integers)

b.
If n is odd the repeating integer is repeated (n-1)/2 times or (n+1)/2.( That is count of repeating integer is one greater than or one less than the count of non repeating integers)

c. The repeating integer is never placed side by side in the array.

How to find out the repeating
integer?


General method of finding the repeating
integer is : creating a binary tree from the given integers. Whenever we encounter a duplicate integer, we can stop building the binary tree and return the repeating integer.

For the given special case, we can use the same algorithm. There are many possible permutations for the input array. If first and third integer same then it will take only three integers to be inspected to find out the repeating element.

So, what is the worst case for above problem. Lets create a permutation where we encounter the repeating integer 2 times as far as possible from the starting point.


If the count of repeating integer is one more then the non-repeating integers, that would have permutations like the one given below.

i. start here->1,2,1,3,1,4,1,5,1,6,1,7,1 ---- We can identify 1 as repeating integer after inspecting 3 integers.

If the count of repeating integer is equal to the non-repeating integers, that would have permutations like the two examples given below.

ii. start here->1,2,1,3,1,4,1,5,1,6,1,7 ---- We can identify 1 as repeating integer after inspecting 3 integers.

iii. start here->2,1,3,1,4,1,5,1,6,1,7,1 ---- We can identify 1 as repeating integer after inspecting 4 integers.


If the count of repeating integer is one less then the non-repeating integers, that would have permutations like the examples given below.

iv. start here->1,2,3,4,1 ---- We can identify 1 as repeating integer after inspecting 5 integers.

v. start here-> 2,3,1,4,1 ---- We can identify 1 as repeating integer after inspecting 5 integers.

Now we can generalize. If the count of repeating integer is two less then the non-repeating integers, that would have permutations like the examples given below (not limited to).

vi. start here-> 1,2,3,4,5,1 ---- We can identify 1 as repeating integer after inspecting 6 integers.

vii. start here-> 2,3,4,1,5,1 ---- We can identify 1 as repeating integer after inspecting 6 integers.

So for the given problem we have to inspect at most 5 integers from the array.



A general formula:

If the count of repeating integer is x less then the non-repeating integers then we have to inspect at most x+4 integers from the array for n greater than equal to 5.

Monday, July 18, 2011

Algorithms and heuristics

Given an array of 9 numbers that contains numbers between 1 to 10, obviously no repetition, one number missing. How to find out the missing number?

Let the numbers in the array be 1,2,4,6,3,7,8,10,9 (total 9 numbers without repetition). I will try to solve this by using following algorithm that randomly came to my mind.

get_missing_number_1(array){

array=Sort(array);


for(i=0 to i
< 9){

temp=array[i+1] - array[i] ;


if(temp>1) return array[i]+1;

}
}


To make things easy, I will give a dry run of this algorithm. Let the array after sorting is 1,2,3,4,6,7,8,9,10. Only number five is missing. For consecutive numbers in array i.e 2-1 is 1, 3-2 is 1 but 6-4 is 2, so 5 is missing.

But there exists a very simple method to find the missing number. Just do this

get_missing_number_2(array){

sum_array= sum of all numbers in array;

sum_1_to_10= sum of all numbers from 1 to 10;


missing_number= sum_1_to_10 - sum_array;


return missing_number

}

So, Did we wasted your time in the analysis of first algorithm?

The second method uses a heuristic and exploits particular properties of the problem. But there is lesser chance to solve the problem if it is generalized using a heuristic. Think, if array size is 8; that is, two numbers are missing , which of the above algorithms can be modified to find both the numbers?

The complexity of algorithm get_missing_number_1 is O(n log n) and get_missing_number_2 is O(n), but the first one is more generic.

Now question arises if there exists an algorithm that finds the missing number for generalized problem in linear time. The algorithm discussed get_missing_number_1 has time complexity O(n log n).

So, let's do divide and conquer. The image below is self-explanatory. The method used is to divide the problem by partitioning.



The time complexity comes out to be n + n/2 + n/4 ......... ~ O(n). {assuming partition divides the problem approximately into 2 equal parts}

On slight modification this algorithm can be used to find out multiple missing numbers. For that we have to follow multiple branches with missing numbers.

Sunday, June 26, 2011

Simple Algorithms - Generate a Series

Lets see how to generate a series i.e 0,1,2,...100,99.....1,0,1,2...... with an additional condition, that is, using only one variable.

First of all we must check the possibility of such an algorithm. Lets make an analogy (refer to figure below). A person runs from a pillar marked 0 towards another pillar marked 100, the distance between them is 100 meters. We take a variable called currentPosition to denote its position at any time. The value of currentPosition will change like 0,1,2,3,4......99,100. Now the person returns back to pillar marked 0. We can use the same variable to denote current position.
Here the direction of movement is different. But, we need not add another variable to denote direction. If the value of currentPosition is positive the person is moving from 0 to 100, if its negative the person is moving from 100 to 0. By analogy we can assume that it is possible to generate a series i.e 0,1,2,...100,99.....1,0,1,2...... using a single variable.

To provide solutions is not my aim. I want to enhance readers problem solving skills. So, try this algorithm yourself.


Also, try to generate a series i.e 0,1,2,...100,99.....1,0,1,2......199,200,199,198............2,1,0 using only one variable? Is that possible?