Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In (theoretical) computer science, we write "#xs" to denote "number of xs".

My sentence was supposed to be read as "g(n) = number of edges", and implicitly, of course (since we're talking about BFS), that means number of edges seen up until now, from ns perspective. And yes, n usually denotes the size of the graph, however, in the context of A*, we usually write n to denote the current node (as per AI:MA).

I take full responsibility. (Disclaimer: I'm a CS professor teaching BFS and Dijkstra's algorithm every semester and A* every 2nd year.)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: