Jump to content


Senior Members
  • Posts

  • Joined

  • Last visited

Posts posted by fiveworlds

  1. Quote

    When I saw the title I thought this was going to be about Hilbert's hotel. This becomes a more interesting problem if you have infinitely many arrivals and you don't want to force guests to move too much as new guests arrive.

    It is plenty interesting for me I am making a website for a real travel agency which takes bookings for many hotels and flights. All bookings require approval from the hotel and I don't want to force guests to move too much.

  2. There was a gun for cops that used an electromagnetic field to stop the firing mechanism with finger recognition. So if the cop was disarmed by an attacker the gun would be useless. You could also stop the firing mechanism remotely. The design was flawed though because a strong magnet could get it to fire again. A better idea would be to use a small motor to stop the firing mechanism that way a magnet would be of no help to an attacker.

  3. Quote

    We have here cinemas in which you can log in, and reserve seats, and buy tickets on-line. There is showed entire cinema room which is playing movie (each room has different settings of seats, in rows and columns, and stairs between them), with the all seats as buttons. They are green or red, indicating whether seat is already reserved or not. User can click on them to reserve them.

    Yeah we have them here too. It would be cool to get that to work for hotels but it would also be a lot more difficult. Cinemas tend to follow a very tabular seating arrangement therefore you can just use a table to map all the seats. A hotel is different because the general layout is generally not as tabular you would be looking at using image maps which involve actual people working coordinates out for the map so it wouldn't scale as easily. 


  4. So this is the database entity relationship diagram that I have at the moment. A user can log into the wordpress site fill in a few details the size of the room etc. and a booking reference is generated for that customer pending approval. Customers that have already been approved a place have to be given a room but I can assign any room to customers that have yet to be approved. It is difficult because while I don't want customers waiting too long for approval I also want to fill as many rooms as possible limiting the amount customers have to change rooms. It is easy to just fill the hotel until all spots are occupied since I know the number of rooms available in total.


  5. Magnet causes electrons in the copper plate to move in a certain direction. This causes electromagnetic induction in the two coils which in turn causes electromagnetic induction in the bulb. 

  6. Would it not be better to use a server for that so people can simply load the website and mark whether they are working from home? 


    My idea was to have a calendar, and when you click on a date, you see the situation for that specific date. So my question for you if if you can help me link the two or find a easier way than creating 360 tabs for each day of the year.


    You could use an excel macro for it. https://www.excel-easy.com/vba.html


  7. Quote

    What do you consider the word "universal" to mean?

    That everyone gets it obviously. But that doesn't stop the government putting conditions on it like you either have to be working or in school or something. There would be nothing to stop the government not paying you because you protested something etc.

    Take the welfare system here you have to be actively looking for work in order to get it. If you go protest something then the government can stop your payment because on that particular day you were not actively looking for work.

  8. Quote

    What are the pros & cons?


    Everybody gets a small amount of money so they can survive even if they don't have a job.

    Everybody should at a minimum have access to education.

    Guaranteed income for non-working parents and caregivers. (such as those with disabled children or parents with Alzheimer's)


    Rent prices could increase due to people having more disposable income therefore there is no guarantee homelessness will be eliminated. (eg. rent allowance here is 300 a month max. There was no houses here to rent in 2018 for anything less than 320)

    Less Incentive to work.

    Genuine poor may receive less targeted support since everyone gets money.

    Gives the government unprecedented control over people. (eg. If you want to keep you BUI you must attend course a or b and achieve minimum grade y)

    Cost of living in different areas could be higher which people in politics often forget. (eg. A family lives in the countryside they have to travel to pick up the BUI, get groceries etc which is more expensive than somebody living in the city who doesn't have to travel)

  9. I generally buy whatever washing powder is cheapest in the supermarket which means I wind up with a load of different brands. Is it safe to mix the end of one box of washing powder with washing powder from a different brand?

  10. Quote

    Sorry, but the rules for the Clay prizes state explicitly that whatever proof you have, it has to be a valid proof in ZFC.

    Where? http://www.claymath.org/millennium-problems/rules-millennium-prizes

    There is a rule however that states I need to publish in a peer reviewed journal which I cannot because most of them only accept papers from people with degrees that I don't have. So therefore I couldn't enter the competition if I wanted to.


    I doubt that it has any bearing on anything whether you also use infinite tape or not.

    Yes it does. The difference between a DTM and an NDTM is to do with the movement of the read head. If the read head can read the whole problem without moving then the problem is in P. If the problem requires an infinite tape then the read head has to move. Therefore all you need to do to prove p = np is prove that no reasonable problem requires an infinite tape. The internal working of how a Turing Machine calculates anything then becomes irrelevant you can use any algorithm even existing ways of calculating travelling salesman etc.





    Deterministic Turing Machine[edit]

    In a deterministic Turing machine (DTM), the set of rules prescribes at most one action to be performed for any given situation.

    A deterministic Turing machine has a transition function that, for a given state and symbol under the tape head, specifies three things:

    • the symbol to be written to the tape,
    • the direction (left, right or neither) in which the head should move, and
    • the subsequent state of the finite control.

    For example, an X on the tape in state 3 might make the DTM write a Y on the tape, move the head one position to the right, and switch to state 5.

    Non-Deterministic Turing Machine[edit]

    By contrast, a non-deterministic Turing machine (NTM), the set of rules may prescribe more than one action to be performed for any given situation. For example, an X on the tape in state 3 might allow the NTM to:

    • Write a Y, move right, and switch to state 5


    • Write an X, move left, and stay in state 3.


  11. Actually I will prove you cannot use ZFC to solve p vs np. 


    The axiom of extension says that two sets are equal if and only if they have the same elements. For example, the set {1,3} and the set {3,1} are equal.

    A turing machine reads a two number tape {a,b} and gets the power.

    a^b does not equal b^a therefore {1,3} and {3,1} are not equal sets and ZFC cannot be used to solve p vs np.

  12. Quote

    For NP=P, if you propose a solution to win the $1M Clay prize money, you have to work out your precise solution in the framework of ZFC set theory, or you will be disqualified.

    That's nonsense there is no proof that ZFC is versatile enough to write p vs np in either direction. P vs np details a set of problems which you have to prove work on a deterministic Turing machine in a polynomial amount of time. For instance I can prove that I can replace words in sentences with a deterministic Turing machine in polynomial time using the following python function which replicates the action of a real deterministic Turing machine. 

    But it can do more than that you can easily replace cities "Cork, London, New York, Brussels" with their shortest travelling salesman result. There is of course a limitation of the number of cities but it'll work for flights and stuff.

    Did you know that time complexity on a Turing machine is measured by how many moves the read/write head has to make. Therefore if you make the read/write head large enough to read any input on your tape you never need to move the read head anything but forward making all algorithms O(n). Of course there is a problem with that approach because a Turing machine allows for an infinite tape size and it is not possible to have an infinitely large read head. So you could prove p=np simply by showing that no problem requires an infinite amount of tape.



    def DeterministicTuringMachineWordReplace(tape, readHead, writeHead):
        #Remove any whitespaces from the start and end of the words
        readHead = readHead.strip()
        writeHead = writeHead.strip()
        #Validate that the string is not empty after removing whitespace
        if len(readHead) == 0:
            print("String to be replaced should not be empty")
        if len(writeHead) == 0:
            print("Replacement string should not be empty")
        if len(tape) == 0:
            print("Sentence should not be empty")
        #Validate that the words only contains valid english characters
        letters = "abcdefghijklmnopqrstuvwzyz"
        for letter in readHead:
            if letter.lower() not in letters:
                print("Expected english letters in string to be replaced saw:"+letter)
        for letter in writeHead:
            if letter.lower() not in letters:
                print("Expected english letters in replacement string saw:"+letter)
        #Create the dictionary of replacements. Words preceded by a . should start with a capital letter
        options = {
           readHead + " ": writeHead + " ",
           readHead + ",": writeHead + ",",
           " " + readHead + " ":" " + writeHead + " ",
           " " + readHead + ".":" " + writeHead + ".",
           "." + readHead + " ":"." + writeHead[0:1].upper() + writeHead[1:len(writeHead)] + " ",
           "." + readHead + ",":"." + writeHead[0:1].upper() + writeHead[1:len(writeHead)] + ",",
           " " + readHead + "!":" " + writeHead + "!",
           " " + readHead + ":":" " + writeHead + ":",
           " " + readHead + "?":" " + writeHead + "?"
        outputTape = ""
        i = 0
        #Loop through the whole sentence
        while i < len(tape):
            if tape in letters and i != 0:
                outputTape = outputTape + tape
                i = i + 1
            #If there isn't enough letters left to make the word then append the letters to the output sentence
            if len(tape) - i - 2 < len(readHead) :
                outputTape = outputTape + tape
                i = i + 1
                replace = False
                for k in options:
                    #Match the word against the possible options
                    if tape[i:i+len(readHead)+2] == k:
                        outputTape = outputTape + options[k]
                        replace = True
                        i = i+len(readHead)+2
                    elif tape[i:i+len(readHead)+1] == k:
                        outputTape = outputTape + options[k]
                        replace = True
                        i = i+len(readHead)+1
                if replace == False:
                    outputTape = outputTape + tape
                    i = i + 1
        print("Original sentence:" + tape)
        print("Changed sentence:" + outputTape)




  13. "first to file" is definitely a thing even if there is a post on a website that is not proof enough that you were the original inventor if somebody else files a patent application.


    deepest pockets win

    Unfortunately this is very true not many people can afford an international patent. Applying for a patent in the US only protects that patent in the US an international patent can cost thousands more and still won't be respected in some countries. 

    There is a website that files international patents but it is very expensive.


  14. No all patents must be filed with the relevant authority. For yourself that is https://www.uspto.gov/patents-application-process/applying-online/about-efs-web

    You must then pay the subsequent fees.


    It is possible to fill out the application yourself if you feel confident or don't have the money to pay a lawyer.

    Note that not all countries will respect your patent. So it is not always the best route to patent things as people in countries such as china can still copy your patent and sell your product without your consent. Sometimes you are better keeping the design a trade secret (like the coca cola recipe) if possible.

  15. Quote

    living on a military base I've heard is almost ridiculously inexpensive.

    Yes I have heard that too. They pay for your accommodation, food, training etc. 

    Working in computer science as a civilian has advantages too. Most of the larger companies Apple, Microsoft etc own (or part own) eLearning platforms (linkedin, udemy etc) which allows you and your family to learn anything for free. They will also contribute to your internet bills if you choose to work from home and you will be allowed to travel all of the time. My brother spends all his time travelling the world and working remotely. They will also pay for your food in you work on campus and provide uniforms. 

    The RAF won't allow you to travel unless it is to war etc so if you want to travel being a civilian is the way to go. The RAF will ensure you keep yourself fit though and might be more interesting since you have access to military tech and might teach you to fly. You should look into GCHQ/Navy too I would imagine they have some cool tech to keep you interested. 

    In terms of money the only real benefit of the RAF is the accommodation which you probably won't use if you ever get married.

  16. Web 2.0 is just useless jargon it isn't a specification of anything and it doesn't add anything new.

    You could always use cgi to make an interactive website like facebook.

  17. Quote

    An MRI contains an extremely strong magnet, and I haven't felt any change in gravity when in one.

    Well yeah because the repulsion is really weak. You'd need a magnet even stronger again and I want to figure out how strong it would actually need to be.

  18. Quote

    That sends me to scratch my head  Are they same stuff

    No they aren't.

    Most people in the US and Europe have a dynamic ip address basically when you connect to the ISP's router you get an ip address automatically and when they reset their router you get a new ip.

    Companies have a static ip address this means that the ISP's always gives the same ip address to the company every time they connect to the internet.

    Dns is how a domain name is converted to an ip address

    Dynamic Dns is a paid service in which companies update the ipadress that the domain name is pointing to. They do this through the use of software. Dynamic Dns can be free but is unreliable.

    The benefit of the static ip is that if you have a camera watching your garden and the ISP resets their router you still have internet access. With a dynamic ip you could be offline for half an hour or more each time. 

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.