Pages

Friday, 27 January 2017

Complexity: What is the most complicated thing ever?

Do you think a Rubik’s cube is the most complicated mechanical puzzle ever invented? You have no idea how complicated mechanical puzzles can be.
A Standard 3x3x3 Rubik’s cube can have 43,252,003,274,489,856,000 combinations, but only 1 solution.
To put this into perspective, if we have one Rubik’s cube for each possible combination, then all the cubes will cover the whole surface of 275 earth-sized planets. and among all of them, only 1 cube will be in perfectly solved state.
But for some people, this was not complicated enough. they created 4x4x4 cubes, and also 5x5x5 cubes.
A 4x4x4 cube has 7401196841564901869874093974498574336000000000 combinations. If you have that many teaspoons of sugar, it will fill a sphere the size of the solar system 3.5 times over.
a 5x5x5 Rubik’s cube has 282870942277741856536180333107150328293127731985672134721536000000000000000 combinations, this is close to number of atoms in the known universe. and yet, people can solve it within few minutes.
So, some people though it was not complicated enough, they created this monster:
Say hello to 11x11x11 cube.



Is it world’s most complicated cube? Nope. The largest cube ever made is 17x17x17. Having a total combination of 66.9 * 10^1053. This number is so huge it’s digits can not even be written in here.
Yet, someone solved this thing in 7.5 hours.
Are Rubik’s cubes are the most complicated puzzle ever? Nope! Lets meet Minxes.
Minxes are like Rubik’s cube, but with more than 6 sides. Having more sides also makes them more complicated.
This is a 3x3x3 MEGAMINX. It has 12 faces and total 50 moving parts, whereas the Rubik’s cube has only 6 faces and 20 moving parts.



A 3x3x3 MEGAMINX
has 100669616553523347122516032313645505168688116411019768627200000000000 combinations, i.e. 1000 billion billion (yes there are two billions) more times than a 4x4x4 rubics cube.
The world record for fastest MEGAMINX solving is 37.58 seconds.
Still not complex enough? meet the GIGAMINX, with a 5x5x5 structure, the Teraminx with 7x7x7 structure and the Examinx, with 9x9x9 structure.



And this is how it looks when scrambled.

The combinations possible with a EXAMINX is not worth calculating…
But wait.
Someone has made a YOTAMINX, a minx with 15x15x15 structure.
Not sure if anyone was able to solve it or not.



And for people with nerve of steel, here is a TUTTAMINX with 32 faces and 150 movable parts.




If you scramble this, it looks like this:





After seeing all these, if you think a puzzle can not be more complicated than a Tuttaminx, you are wrong!
Multiple Minxes can be fused together to form a combined minx. Here is a triple fused Petaminx.



These puzzles have no practical use for mortals. Although in Hell, they may ask you to solve one.


 There are Shape shifting puzzles with non-linear movements as well, like the "GHOST CUBE".


This is how it looks when scrambled, Goodbye brain.




Due to each piece being of a different shape, this puzzle is notoriously difficult to solve. Unlike a Rubik’s cube the movements of the pieces are restricted due to their shape, so it’s very difficult to mathematically calculate the number of possible moves with this one.
R.I.P brain.!!

Thursday, 26 January 2017

China Aims to Wash VPNs Out of Its Hair




China this week announced new measures to further restrict its citizens' access to the Internet.
The 14-month campaign appears designed to crack down on the use of Web platforms and services unapproved by the government, and on virtual private networks, which can used to access those platforms and services covertly.
While China's Internet network access services market is facing many development opportunities, there are signs of "disorderly development" that show the urgent need for regulation, the country's Ministry of Industry and Information Technology explained in a notice posted to a government website.
The coming "clean-up" of China's network access services will standardize the market, strengthen network information security management, and promote the healthy and orderly development of the country's Internet industry, the ministry noted.
In order to operate legally, Internet service providers, VPN providers, data centers and content delivery networks will have to obtain a license from the government and adhere to strict limitations.

Great Firewall

The clean-up also places severe new restrictions on cross-border business activities. It requires that government approval be obtained to create or lease lines, including VPN channels, to perform cross-border business activities.
Those restrictions essentially will block any Chinese citizen from using a VPN -- basically, hiding their IP address and rerouting their connections to servers outside their country -- in order to access websites the government doesn't want them to see.
China is famous for controlling the information its citizens can see on the Internet with its "Great Firewall," which screens Internet traffic between China and the outside world. Any requests to see information Beijing deems inappropriate are sent to an Internet graveyard.
Among the 171 of the world's top 1,000 websites the Great Firewall blocks are Google, Facebook and Twitter, according to Greatfire.org, a censorship monitoring service. VPNs offer a way to get through the firewall, which is why the government wants to block them.
China also has taken a more proactive approach to dealing with websites that it doesn't like. It crafted a Great Cannon, which it uses to launch DDoS attacks on domains critical of Beijing

Thursday, 10 November 2016

Superstitions in India

Superstition is the belief in supernaturalcausality—that one event causes another without any natural process linking the two events—such as astrology and certain aspects linked to religion, like omenswitchcraft, and prophecies, that contradict natural science.
The word superstition is generally used to refer to the religion not practiced by the majority of a given society – such as Christianity in Western culture – regardless of whether the prevailing religion contains superstitions. It is also commonly applied to beliefs and practices surrounding luck, prophecy, and certain spiritual beings, particularly the belief that future events can be foretold by specific (apparently) unrelated prior evenorg
Here is a video related to Superstitions in India

SOURCE : www.Wikipedia.org

Monday, 25 April 2016

Stephan Hawking---A Brief History of Time (EPUB/PDF)



A landmark volume in science writing by one of the great minds of our time, Stephen Hawking’s book explores such profound questions as: How did the universe begin—and what made its start possible? Does time always flow forward? Is the universe unending—or are there boundaries? Are there other dimensions in space? What will happen when it all ends?

Told in language we all can understand, A Brief History of Time plunges into the exotic realms of black holes and quarks, of antimatter and “arrows of time,” of the big bang and a bigger God—where the possibilities are wondrous and unexpected. With exciting images and profound imagination, Stephen Hawking brings us closer to the ultimate secrets at the very heart of creation.

“[Hawking] can explain the complexities of cosmological physics with an engaging combination of clarity and wit. . . . His is a brain of extraordinary power.”—The New York Review of Books

“This book marries a child’s wonder to a genius’s intellect. We journey into Hawking’s universe while marvelling at his mind.”—The Sunday Times (London)

“Masterful.”—The Wall Street Journal

“Charming and lucid . . . [A book of] sunny brilliance.”—The New Yorker




Thursday, 21 April 2016

भगवान इंसान की सबसे बड़ी खोज ।

वेदों एवं पुराणों के अनुसार ब्रह्माण्ड की संरचना भगवान ब्रह्मा ने की थी । साथ ही साथ यह भी कहा जाता है की वे विष्णु भगवान की नाभि से निकले कमल से अवतरित हुए थे । ठीक है हम यह मान लेते हैं की यह सच है तो विष्णु ने भगवन कहां से जन्म लिया था । इन सब सवालों के जवाब तो अभी तक कई इंसानों को नहीं पता है । तो आइये चलते हैं इनके जवाब ढूँढ़ने ।


अगर हम किसी भी धर्मों में झाँक के देखें तो हम सही ढंग से यह अनुमान लगा सकते है की हम जिस भी प्राकृतिक घटना को अगर हम समझ नहीं सके तो हमने उसे भगवान का नाम दे दिया । कुछ उदाहरण है जैसे की :-
1 ) सूर्य के प्रकाश का कोई भी कारण हमें नहीं पता था तो हमने उन्हें सूर्य देव बन दिया ।

2 ) इंद्रधनुष को जो की प्रकाश के अपने अलग अलग रंगों में टूटने के कारण बनता है । देवेन्द्र का धनुष बन गया ।


What is Science?

The Fabric of Space and Time

What is Science? is one of the most simplest questions a child curious to know asks.The question itself seems to be a simple one but when one starts explaining it, the answer seems to be a never ending. So what exactly science is what you will came to know today!

The word 'Science' originates from Latin verb Scientia, meaning 'to know'. The Sanskrit word Vijnana(विज्ञान) expresses similar meanings.

Fewer Definitions of Science are :


Science alone of all the subjects contains within itself the lesson of the danger of belief in the infallibility of the greatest teachers in the preceeding generation . . .As a matter of fact, I can also define science another way: Science is the belief in the ignorance of experts.

                                 ----------Richard Feynman, Nobel-prize-winning physicist,
                                       in The Pleasure of Finding Things Out
                                       as quoted in American Scientist v. 87, p. 462 (1999).





The systematic observation of natural events and conditions in order to discover facts about them and to formulate laws and principles based on these facts. 2. the organized body of knowledge that is derived from such observations and that can be verified or tested by further investigation. 3. any specific branch of this general body of knowledge, such as biology, physics, geology, or astronomy.

                                -----------Academic Press Dictionary of Science & Technology




Science is an intellectual activity carried on by humans that is designed to discover information about the natural world in which humans live and to discover the ways in which this information can be organized into meaningful patterns. A primary aim of science is to collect facts (data). An ultimate purpose of science is to discern the order that exists between and amongst the various facts.

           -----------Dr. Sheldon Gottlieb in a lecture series at the University of South Alabama


Wednesday, 23 March 2016

Alphabet D Of Asterick '*'

# To print Alphabet D of Asterick '*'
# Set your font type As Courier New


n=int(raw_input("Enter a Number : "))
m=n
n=(n-1)/2
for i in range(n) :
    print "*",
print
for i in range(m-2) :
    print "*",
    for i in range(n-1) :
        print " ",
    print "*"
for i in range(n) :
    print "*",
print

OUTPUT
Enter a Number : 9
* * * *
*       *
*       *
*       *
*       *
*       *
*       *
*       *
* * * *

Sunday, 20 March 2016

Alphabet C Of Asterick '*'

# To print Alphabet C of Asterick '*'
# Set your font type As Courier New

n=int(raw_input("Enter a Number : "))
n=(n-1)/2
print " ",
for i in range(n) :
    print "*",
print
for i in range(2*n-1) :
    print "*"
print " ",
for i in range(n) :
    print "*",
print

OUTPUT
Enter a Number : 9
  * * * *
*
*
*
*
*
*
*
  * * * *

Tuesday, 15 March 2016

Alphabet B of Asterick "*"

# To print Alphabet B of Asterick '*'
# Set your font type As Courier

n=int(raw_input("Enter a Number : "))
n=(n-1)/2
for i in range(n) :
    print "*",
print
for i in range(n-1) :
    print "*",
    for i in range(n-1) :
        print " ",
    print "*"
for i in range(n) :
    print "*",
print
for i in range(n-1) :
    print "*",
    for i in range(n-1) :
        print " ",
    print "*"
for i in range(n) :
    print "*",
print

OUTPUT
Enter a Number : 9
* * * *
*       *
*       *
*       *
* * * *
*       *
*       *
*       *
* * * *

Alphabet A of Asterick "*"

# To print Alphabet A of Asterick '*'
# Set your font type As Courier
n=int(raw_input("Enter a Number : "))
m=n
n=(n-1)/2
a=-1
for i in range(n) :
    print (m-1)*" ",
    print "*",
    for k in range(a) :
        print " ",
    if a==-1 :
        print
    else :
        print "*"
    a=a+1
    m=m-1
print (m-1)*" ",
m=m-1
a=a+1
for i in range(n+1) :
    print "*",
print
for i in range(n) :
    print (m-1)*" ",
    print "*",
    for k in range(a) :
        print " ",
    print "*"
    a=a+1
    m=m-1

OUTPUT
Enter a Number : 9
         *
        * *
       *   *
      *     *
     * * * * *
    *         *
   *           *
  *             *
 *               *


Thursday, 10 March 2016

Pallindrome String

# WAP to check if a string is pallindrome or not
# Set Your Font as Courier New

z=raw_input("Enter a string: ")
z.lower()
for i in range(-len(z),0) :
x=x+z[i]
if x==z :
print "Given String is Pallindrome"
else :
print "Given String is not a Pallindrome"

Output 1
Enter a string: aIbohPhoBiA
Given String is Pallindrome

Output 2
Enter a string: palindrome
Given String is not a Pallindrome

Thursday, 25 February 2016

Binary Search In Python

# Write A Program For Binary Search In Linear List….
# Set your Font type as Courier

def bsearch(L,z) :
    M=list(L)
    f=0
    l=len(L)
    for i in range(len(L)) :
        mid=(f+l)/2
        if L[mid]==z :
            return mid+1
        elif L[mid]!=z :
            if L[mid]>z :
                l=mid-1
            elif L[mid]<z :
                f=mid+1
    return 0
n=int(raw_input("Enter the length of list"))
L=[0]*n
for i in range(n) :
    L[i]=int(raw_input("Enter Element"+str(i+1)+" : "))
L.sort()
z=int(raw_input("Enter item to be searched for : "))
p=bsearch(L,z)
if p==0 :
    print"Not found"
else :
    print "Element Found at Position",p

Linear search in Python

# Write A Program For Linear Search In Linear List….
# Change your Font Type as Courier

def linear_search(L,z) :
    for i in range(len(L)) :
        if L[i]==z :
            print "Element found at index :",i,"Position :",i+1
    else :
        print "Element not in the List"
n=int(raw_input("Enter desired linear-list size (max. 50)..."))
print "Enter elements for Linear List"
L=[0]*n
for i in range(n) :
    L[i]=raw_input("Enter Element "+str(i)+" : ")
z=raw_input("Enter Element to be searched for . . . ") 
linear_search(L,z)

Monday, 22 February 2016

Hybrid Inheritance

# Write A Program To Show Hybrid Inheritance….
# Set Your Font Type as Courier

class Vehicle :
    def __init__(self,name,model) :
        self.name=name
        self.model=model
    def details(self) :
        print "Name:",self.name,"\n","Model:",self.model
class Car(Vehicle) :
    def __init__(self,name,model,colour) :
        Vehicle.__init__(self,name,model)
        self.colour=colour
    def details(self) :
        Vehicle.details(self)
        print "colour:",self.colour
class Truck(Vehicle) :
    def __init__(self,name,model,hp) :
        Vehicle.__init__(self,name,model)
        self.hp=hp
    def details(self) :
        Vehicle.details(self)
        print "Horse Power:",self.hp
class MonsterTruck(Car,Truck) :
    def__init__(self,name,model,colour,hp,price):
        Car.__init__(self,name,model,colour)
        Truck.__init__(self,name,model,hp)
        self.price=price
        print "Initialized MonsterTruck:",
        print self.name
    def details(self) :
        Car.details(self)
        Truck.details(self)
        print "Price:",self.price
m=MonsterTruck("Mustang",2009,"Blue",900,4200000)

m.details()

Over-riding in Python

# Write A Program To Show Overriding With Super Function….
# Set Your font type as Courier

class A(object) :
    def __init__(self,a) :
        self.a=a
        print "A's __init__"
    def method1(self) :
        print "A's method1 : a is",self.a
class B(A) :
    def __init__(self,b,a) :
        self.b=b
        print "B's __init__"
        super(B,self).__init__(a)
    def method1(self) :
        print "B's method1 : b is",self.b
        super(B,self).method1()
obj1=B(17,22)

obj1.method1()

Multilevel Inheritance

# Write A Program To Show Multilevel Inheritance….
# Set Your font type as Courier

class Vehicle(object) :
    def __init__(self,l=0,w=0) :
        self.length=l
        self.width=w
    def define(self) :
        print "Vehicle with length",self.length,"in & width",self.width,"in"
class Car(Vehicle) :
    def __init__(self,clr,seats,l,w) :
        Vehicle.__init__(self,l,w)
        self.colour=clr
        self.seatingCapacity=seats
    def changeGears(self,gr) :
        print "Changed to Gear",gr
    def turn(self,direction) :
        print "Turned to",direction,"direction"
class RacingCar(Car) :
    def __init__(self,clr,seats,l,w,tr,spd) :
        Car.__init__(self,clr,seats,l,w)
        self.turnRadius=tr
        self.speed=spd
        print "Racing Car instance created"
    def start(self) :
        self.define()
        self.changeGears(2)
        print "Racing Car Starts - Ready to vroom!"
rcar=RacingCar("Blue",2,206,78.5,6,200)
rcar.start()

rcar.turn("left")

Hierarchical Inheritance

# Write A Program To Show Hierarchical Inheritance….
# Set Your font type as Courier

class Animal(object) :
    def __init__(self,name) :
        self.name=name
    def speak(self) :
        print self.name,"says",self.sound()
class Cow(Animal) :
    def __init__(self,name) :
        Animal.__init__(self,name)
    def sound(self) :
        return"moo"
class Horse(Animal) :
    def __init__(self,name) :
        Animal.__init__(self,name)
    def sound(self) :
        return"neigh"
class Sheep(Animal) :
    def __init__(self,name) :
        Animal.__init__(self,name)
    def sound(self) :
        return"baaaaa"
h=Horse("Chetak")
h.speak()
c=Cow("Rambha")
c.speak()
s=Sheep("Mithi")

s.speak()

Multiple Inheritance

# Write A Program To Show Multiple Inheritance….
# Set Your font type as Courier
class SpecialEngine(object) :
    def __init__(self,p) :
        self.power=p
    def ignition(self) :
        print "Engine Started"
class Car(object) :
    def __init__(self,clr,seats) :
        self.colour=clr
        self.seatingCapacity=seats
    def changeGears(self,gr) :
        print "Changed to Gear",gr
    def turn(self,direction) :
        print "Turned to",direction,"direction"
class RacingCar(SpecialEngine,Car) :
    def __init__(self,clr,seats,p,tr,spd) :
        SpecialEngine.__init__(self,p)
        Car.__init__(self,clr,seats)
        self.turnRadius=tr
        self.speed=spd
        print "Racing Car instance created"
    def start(self) :
        self.ignition()
        self.changeGears(2)
        print """Racing Car Starts - Ready to vroom!"""
rcar=RacingCar("Blue",2,750,6,200)
rcar.start()

rcar.turn("left")

Sunday, 7 February 2016

Stack Operations in Python

#program for stack operations
def isempty(stk) :
    if len(stk)==0 :
        return True
    else :
        return False
def PUSH(stk) :
    x=[]
    n=raw_input("Enter Your Name : ")
    no=int(raw_input("Enter Your Number"))
    x.append(n)
    x.append(no)
    stk.append(x)       #x Stores the data in list [Name,Number]
    return stk
def POP(stk) :
    if isempty(stk) :
        print "Empty Stack"
    else :
        x=stk.pop()
        return x
def DISPLAY(stk) :
    y=len(stk)
    z=y
    for i in range(y) :
        if i==0 :
            x=POP(stk)
            print "Item number",z,"is",x,"<----Top"
            z=z-1
        elif i==y-1 :
            x=POP(stk)
            print "Item number",z,"is",x,"<----Bottom"
            z=z-1
        elif i!=0 :
            x=POP(stk)
            print "Item number",z,"is",x
            z=z-1
        no=x.pop()
        n=x.pop()
        print "Name : ",n
        print "Number : ",no
stk=[['Anurag', 9958220446],['Ayush', 8138987125],['Jagrat', 9956288854]]
while True :
    print """Choose from the following menu : -
1) PUSH
2) POP
3) DISPLAY
4) EXIT"""
    ch=int(raw_input("Enter Your Choice : "))
    if ch==1 :
        PUSH(stk)
    elif ch==2 :
        if isempty(stk) :
            x=None
            print "Empty Stack"
        else :
            x=POP(stk)
            print x,"is the popped item."   #To show the popped data
            no=x.pop()
            n=x.pop()
            print "Name : ",n
            print "Number : ",no
    elif ch==3 :
        DISPLAY(stk)
    else :
        break