The statement "f(x) is O(g(x))" as defined above is usually written as f(x) = O(g(x)). Some consider this to be an abuse of notation, since the use of the equals sign could be misleading as it suggests a symmetry that this statement does not have. As de Bruijn says, O(x) = O(x^2) is true but O(x^2) = O(x) is not

I understand the formal definition but not what de Bruin says. Im puzzeled by trying to understand what O(x) = O(x^2) or even O(x) is O(x^2) really means.

Intuitively I would read it as "The class of functions with complexity x is the same as the class of functions with complexity x^2". But that does not make sense.

The wikipedia talk page does not help much either.

Intuitively I would read it as "The class of functions with complexity x is the same as the class of functions with complexity x^2". But that does not make sense.

Yes, and that is why people don't like the notation with the equals sign.

It should read as "The class of functions with complexity x is included in the class of functions with complexity x^2" or "A function with a linear upper bound for complexity is also a function with a quadratic upper complexity bound" (where of course the quadratic bound is not very tight).

In math, '=' is usually expected represent "equality", and should be an equivalence relation. This means it should be reflexive, symmetric and transitive.

As de Bruijn says, O(x) = O(x^2) is true but O(x^2) = O(x) is not

means the relation is not symmetric.

Similar Questions

I was wondering whether Jade has an equivalent shorthand syntax like $!variable_name in Velocity? $!variable_name is the quiet reference notation of velocity which means that when variable_name has a

I am trying to determine why the bigO of this algorithm is m^2*n, and why the innermost loop is executing in m^2*n steps. int m=10, n=15; int inLoop = 0, midLoop = 0, outLoop = 0; for(int i=1;i<=

my objective is to use recursion to get sigma notation working. top limit is n(input variable) bottom limit is i=1, and the function is (-i)^(i-1). i got it working with iteration but i cant get the r

I'm trying to do the challenge on http://www.cstutoringcenter.com/problems/problems.php?id=2 and I'm having problems converting scientific notation to decimal notation, which I need to add the exponen

How can i check if position equals? trying to reach something like this: if($(element).css({ left: 468px}) == 468) else

How it will work? If i press the button and the text field is empty it will display a asterisk sign besides the textfiled. if(txtfname.getText().equals( )){ JOptionPane.showMessageDialog(null, Miss

I have one BaseEntity which abstracts id and version property. this class also implements hashcode and equals based on PK (id) property. BaseEntity{ Long id; Long version; public int hashCode() { fin

I am trying to write a linear program and need a variable z that equals the sign of x-c, where x is another variable, and c is a constant. I considered z = (x-c)/|x-c|. Unfortunately, if x=c, then thi

Why do I need to override Equals and GetHash code in my Entities when using NHibernate? Today I got this error System.ApplicationException : For property 'Person' expected 'Domain.Person' of type 'Dom

I just have problem with subneting network address in CIDR notaion ,can anyone explain it for me? for example how can I solve this question: Give the subnet addresses in CIDR notation if the network a

Before using C#, C++ was my primary programming language. And the Hungarian notation is deep in my heart. I did some small projects in C# without reading a C# book or other guidelines on the language.

i'm having an issue in excel and i need help from someone who knows better. Quick story : i'm a rolist, i'm doing character sheet on excel and i need to do dice notation calcul. I need to be able to w

I am working on a problem from RubyMonk called Kaprekar's Number. For example, 9^2 is 81 and the result added is 9 again: 8 + 1 = 9. In a part of the problem they use a double dot notation that I do

I can't find a solution for this problem. I have this URL http://examplesite.com/?skill-type=new and I want to get the very last word after the = sign, using PHP only. skill-type stays the same all

In Lua there's a short notation for sending the self to a function, so a.withdraw(a, 100.0) can be written a:withdraw(100.0). Shouldn't it be possible to do a similar extension to OCaml, letting Lis

ZedGraph likes to use engineering notation for its axes, e.g. 300*10^3 instead of scientific notation, e.g. 3*10^5. What is the easiest way to change this?

jshint gives the error: Line 362: document.forms['upload_form'].submit(); ['upload_form'] is better written in dot notation. for this line document.forms['upload_form'].submit(); What dot notation..

I'm taking in a float as input, and then outputting its equivalent representation in base 2 scientific notation. This is in IEEE 32 bits with: 31 sign bit, 23-30 exponent (with 127 offset), 0-22 manti

I want to ask you about the notation in probability. I know that P(A | B) = the conditional probability that event A occurs given that event B has occurred already But I cannot find what A,B or in

I am dynamically grabbing image links from a database and inserting them into image tags. This php code checks if there is a link or not. If there is a link, that link is inserted into the img code. I

This code: string currentPrice = String.Format({0:c}, ((TblProduct)e.ListItem).Price); shows the price in dollars, ie $320.00. But I want to show a peso sign instead of a dollar sign. What system.s

In the PHP manual for function sprintf I find: e - the argument is treated as scientific notation (e.g. 1.2e+2). The precision specifier stands for the number of digits after the decimal point since

What Big-O notation questions have you been asked? Did you find them to be good questions? Did the interviewer actually understand the concept?

Can someone explain to me the difference between =, ==, and ===? I think using one equal sign is to declare a variable while two equal signs is for a comparison condition and lastly three equal signs

I just want to know if there is a best practice or a common way to test equals implementation in objects. I mean test method that has been overridden. public boolean equals(Object o) I did using some

So I'm learning Java and I'm trying to understand equals, but I really don't understand it. So my question is: how does equals works? Thanks

Hello I just have a simple question, why is the big O notation of a sorted array O(log N)? It will be a sorted array.

I know that the following do notation's bind function is equivalent to getLine >>= \line -> putStrLn do line <- getLine putStrLn line But how is the following notation equivalent to b

I have simple class Point with two fields of type double. I asked Eclipse 3.6 to generate equals() and hashCode() for it. The equals() method looks like this: @Override public boolean equals(Object ob

In javascript, properties of objects can be accessed using dot-notation instead of bracket-notation -- object.propertyName can be used in place of object[propertyName]. How can I do this in C#? As a

I've coded a simple calculator with java for android. I use double as my variables. The results it gives me are in scientific notation after it reaches a certain number of decimals although there is s

I'm studying a degree in computer science and at class we're using big-theta notation much more often than big-O notation. Although while reading articles about algorithms and its running times, I har

I'm using angularjs' $http service to post data to my API. It works great.. until I add and equals sign to the contents of data (JSONRequest in example) var request = { 'method': 'POST', 'url': API_UR

I just started learning Java and came across equals. After looking for the difference between equals and ==, I decided to practice it myself but I am not getting the expected results. here is the code

I am overriding the equals() method in a Java class and found a conundrum that I can't explain. The standard equals() contract states this: It is reflexive: for any reference value x, x.equals(x) sh

I have seen the formula =IF(SUMPRODUCT(($A$2:$A2=A2)*($B$2:$B2=B2))>1,0,1) in here I am confused about this equal sign = ... What is it for ?

I'd like to remove the equals sign only if is not followed by 3D. Here there is an example. NB2HI4B2F4XWM3LNFZCGK3DJOZSXE6L=PNZSS4Y3PFZZWGSZB5GUTGKPLE=ONZXA33PNZSXEQ So this should became NB2HI4B2F4

I'm trying to suggest username for sign up page with jquery. im just wondering how can i get the value of email address before @ sign. right now i can get complete value with $(#email).val(); shou

I want to override equals() method in this class. I follow the usual rules while overriding the equals() method but and I typecast the Object into my class type but in my equals() method, I want to re

I have the exact opposite of Xcode 4 dot notation code sense problem! The code completion for dot notation shows not only properties but also methods for me (with P or M marked on the left of each com

I have a bunch of strings of the form: AAA.BBB[0].CCC.DDD[5].EEE = 123. Some contain even more deeply nested arrays. How would I convert that dot notation to the equivalent JSON object? I am using j

class Hash { int a; Hash(int h){ a=h; } public boolean equals(Object o) { Boolean h=super.equals(o); System.out.println(Inside equals ); return h; } public int hashCode() { System.out.println(Insid

I'm using GKeyFile to store configuration. I need to store a dictionary of URLs to boolean values. URLs are strings, so . GKeyFile seemed like a good fit, but some of my URLs have equals signs in them

Is there a way to make this call in dot notation?: [someSwitch setOn:YES animated:YES]

When comparing arrays in Java, are there any differences between the following 2 statements? array1.equals(array2); Arrays.equals(array1, array2); And if so what are they?

I recently received a downvote for using the following in a recent answer: String word = ...; if (s.equals(word) || y.equals(word) The downvote was given due to using a yoda condition. I asked

Where can I get info about implementing my own methods that have the ellipsis notation, e.g. static void my_printf(char* format, ...) { } Also is that called ellipsis notation or is there a fancier n

is possible to add spaces between equals? Like this image. Spaces are on the left side of '='. Plain Text: string foo = ; string boo = ; string <big space> = ;

So I have a setup like this: interface A{ } class B implements A{ public int hashCode() { ... } public boolean equals(final Object obj) { ... } } class C implements A{ public int hashCode() { ... } pu

I need clarification for the following notation in C: I have a struct, and within that struct I have the following field: bool (* process_builtin)(struct esh_command *); I am pretty confused here.. So