computer-science

How to compute the absolute minimum amount of changes to convert one sortorder into another?

Goal How to encode the data that describes how to re-order a static list from a one order to another order using the minimum amount of data possible? I have a feeling there is an algorithm or computer science term that will help me but right now I'm too stuck on the problem to figure out other ways of looking at it. Background Motivat...

How to keep up to date on latest computer science?

I was re-reading some of my Steve McConnell books and this quote got me thinking 'scientists build in order to learn, engineers learn in order to build'. On the vein of 'learning in order to build' I was wondering: How are the software engineers keeping up to date on the latest technologies and research? It would seem that publications...

What is the difference between monotonicity and the admissibility of a heuristic?

I'm reading over my AI textbook and I'm curious about what the difference is between monotonicity and admissibility of heuristics (I know they aren't mutually exclusive). As far as I can tell, an admissible heuristic simply means you are ensured to get the shortest path to a solution if one exists. What I'm struggling with is the conc...

Context Free Grammar for Unary Addition

Given an alphabet of 1s I want to parse addition of the form 1^k + 1^j = 1^k+j This is pretty easy to represent with a pushdown automaton simply by pushing a 1 on to the stack on each of the first two 1s, and then popping on the last set of 1s. However, I can't seem to figure out how to represent this as a context free grammar, which...

What is the actual definition of an array?

Possible Duplicate: Arrays, Whats the point? I tried to ask this question before in What is the difference between an array and a list? but my question was closed before reaching a conclusive answer (more about that). I'm trying to understand what is really meant by the word "array" in computer science. I am trying to reach an...

Hilbert System - Automate Proof

I'm trying to prove the statement ~(a->~b) => a in a Hilbert style system. Unfortunately it seems like it is impossible to come up with a general algorithm to find a proof, but I'm looking for a brute force type strategy. Any ideas on how to attack this are welcome. ...

Is there a simple way I can tokenize a string without a full-blown lexer?

I'm looking to implement the Shunting-yard Algorithm, but I need some help figuring out what the best way to split up a string into its tokens is. If you notice, the first step of the algorithm is "read a token." This isn't exactly a non-trivial thing to do. Tokens can consist of numbers, operators and parens. If you are doing some...

In Natural language processing, what is the purpose of chunking?

Does anyone know? Is this a place to ask Computer science questions or just programming? ...

Why is (a | b ) equivalent to a - (a & b) + b?

I was looking for a way to do a BITOR() with an Oracle database and came across a suggestion to just use BITAND() instead, replacing BITOR(a,b) with a + b - BITAND(a,b). I tested it by hand a few times and verified it seems to work for all binary numbers I could think of, but I can't think out quick mathematical proof of why this is cor...

Real-world use of binding objects in ruby

Last night, I was thinking about what i think are advanced ruby language features, namely Continuations (callcc) and Binding objects. I mean advanced because I have a statically-typed oo langages background (C#, Java, C++), I discovered ruby very recently, so these language features are not very familiar to me. I'm wondering what could...

How can we convince the administration of our university that computer science is important enough to retain it as a discipline?

The university where I teach is currently restructuring in a major way. Alas, we have been told that we have one week to respond to a current plan which includes discontinuing computer science as a teaching discipline, and breaking the current computer science department between mathematics and electrical engineering. Merging the who...

inventory, supply chain, procurement management and computer science- General, high-level question

Hello, I would like to ask a rather, general, high-level introductory kind of question regarding inventory management. So, I was wondering if anyone on SO had any experience/knowledge, or worked with in the past in inventory, supply chain, procurement management settings. What typical problems or challenges one might find in this field...

looking for scientific evidence of the benefits of using a DSL

Greg Wilson's talk "bits of evidence" ( http://www.slideshare.net/gvwilson/bits-of-evidence-2338367 ) discusses the lack of evidence behind the following claims that Martin Fowler has advanced as benefits of using a DSL: "[using a domain-sepcific language] lead to two primary benefits. The first, and simplest is improved programmer prod...

where can i find papers on Web Spiders and AI ?

im interested in finding algorithms or appraoches in developing spiders which follow some AI or crawling model highlighted in computer science papers.. where can i find such papers? ...

Finding the highest 2 numbers- computer science

I'm trying to figure out an algorithm to find the highest 2 numbers in a list of numbers. The highest number can be found in n-1 stages, perhaps by doing the fist step of a bubble sort or something along those lines. To me it seems that finding the next highest number as well could be found in a total of 1.5n comparisons on average. ...

Which CS curriculum to take?

I'm currently planning to do a transfer right now and my area of interest is Software Development. I've been thinking a lot about these two curriculum and I want to ask advice on which one would benefit me in my future career (I'm thinking long term). This is from a university: http://www.cs.sfu.ca/undergrad/prospective/programs/sosy...

How would you interpret this Compiler/Grammar homework question?

I'm working on my compiler homework and I have the following question: Consider the following grammar: lexp -> number : (op lexp-seq) op -> + | - | * lexp-seq -> lexp-seq lexp | lexp This grammar can be thought of as representing simple integer arithmetic expressions in LISP=like prefix form. For example the expression 34-3*4...

Rules Engine vs Expert System

What is the difference between a rules engine and an expert system? Example1: Let's say that I have a program that determines the expiration date of a new driver's license. It takes inputs like visa expiration date, passport number, birthday, etc. It determines the expiration date of the driver's license from this input. It can even g...

Pac-Man representation with Finite State Automaton

Hi there, Consider a game similar to pac-mac that we want to represent it with an FSA graph. We have a maze (table) and there are berries into it in random positions. The goal is to eat all the berries in the maze. The commands we have to consider for the control are the following: GOAHEAD, LEFT, RIGHT, CHECKBERRY(that checks if there is...

BNF Grammar Derivation

I want to apply rules of BNF Grammar to produce derivation for : a_Num ...