Personal tools

Open research problems

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
 
This is a problem that came up during IRC discussions. We consider a purely function language. By purely functional we mean a language that has value semantics. I.e. there is no function s.t. after evaluation of the function the value that was referred to by something else changed. A value is "changed" when it is not the case during an evaluation that when the old value and the new value would both be fully evaluated, there wouldn't be the same result. This should make sure that laziness is allowed in the purely functional language.
 
This is a problem that came up during IRC discussions. We consider a purely function language. By purely functional we mean a language that has value semantics. I.e. there is no function s.t. after evaluation of the function the value that was referred to by something else changed. A value is "changed" when it is not the case during an evaluation that when the old value and the new value would both be fully evaluated, there wouldn't be the same result. This should make sure that laziness is allowed in the purely functional language.
   
  +
The general problem is whether these purely functional languages can implement all algorithms that can be implemented in a language like C as efficient in an amortized sense.
  +
  +
As for a specific problem [1] :
 
Given a list of numbers, implement a data type s.t. every number is stored in a structure, all structures together holds the numbers exactly once. One operation that needs to be supported is to move one element to another structure (possibly creating a new structure). A second operation is that given a number one should be able to return the structure holding that number. All operations should run in amortized O(1) time.
 
Given a list of numbers, implement a data type s.t. every number is stored in a structure, all structures together holds the numbers exactly once. One operation that needs to be supported is to move one element to another structure (possibly creating a new structure). A second operation is that given a number one should be able to return the structure holding that number. All operations should run in amortized O(1) time.
  +
  +
[1] It might be the case that this is a trivial problem and that I forgot some further conditions, if that's the case I will correct it later when a solution is posted.

Revision as of 16:01, 11 May 2007

This is a problem that came up during IRC discussions. We consider a purely function language. By purely functional we mean a language that has value semantics. I.e. there is no function s.t. after evaluation of the function the value that was referred to by something else changed. A value is "changed" when it is not the case during an evaluation that when the old value and the new value would both be fully evaluated, there wouldn't be the same result. This should make sure that laziness is allowed in the purely functional language.

The general problem is whether these purely functional languages can implement all algorithms that can be implemented in a language like C as efficient in an amortized sense.

As for a specific problem [1] : Given a list of numbers, implement a data type s.t. every number is stored in a structure, all structures together holds the numbers exactly once. One operation that needs to be supported is to move one element to another structure (possibly creating a new structure). A second operation is that given a number one should be able to return the structure holding that number. All operations should run in amortized O(1) time.

[1] It might be the case that this is a trivial problem and that I forgot some further conditions, if that's the case I will correct it later when a solution is posted.