Search

Filter

  • Advanced Filters:

  • to
  • Specific Data Sources:

    All Edit

    Select All  |  Select None

Reset filters

W h y is a F u n c t i o n Defined as a Set of O r d e r e d Pairs? Ann Q. Gates and Vladik Kreinovich Department of Computer Science The University of Texas at El Paso El Paso, Texas 79968 {agates, vladik}@cs.utep.edu Abstract In this short note, we describe the reasoning that makes the standard mathematical definition of a function (as a set of ordered pairs) more natural for students in an introduction to computer science course. Standard Definition of a Function he standard definition o f a function is not 100% intuitive. The introductory course in c o m p u t e r science typically reviews the basic mathematical definitions and relates t h e m to concepts in c o m p u t e r science (see, e.g., [1]). One of these definitions, a f u n c t i o n f f r o m the set X to the set Y, is defined as a set o f ordered pairs (x,y) such that for every x e X there exists one and only one y ¢ Y for which (x,y) ¢ f. C o m p u t e r science students usually k n o w this definition f r o m prerequisite m a t h e m a t i c s classes. M a t h e m a t i c s and c o m p u t e r science textbooks usually explain this definition using an e x a m p l e of a function f r o m real n u m b e r s (or integers) to real numbers, where the pairs (x,(x)) f o r m a graph. However, students often do not feel c o m f o r t a b l e with this definition, especially when it is applied to input data that is m o r e c o m p l i c a t e d than real n u m b e r s or integers. For instance, consider boolean functions not and, similarly, and, that can be defined as { (true,false), (false,true) } and {((true,true),true), ( ( t r u e , fal s e ) , f a l s e ) , ((false,true),false), ((false,false),false)}, respectively. In this note, we describe an additional explanation that m a k e s this definition m o r e intuitive for our students. We h o p e that this explanation will be useful to other teachers of the c o m p u t e r science introductory course. The p r o g r a m works as a black box illustrated as follows. We input x , ¢ Something occurs, but we do not know what, and ¢ f(x) appears. ¢ T To describe each computation, we can record what we see: ¢ Each input value, x, and ¢ The corresponding output value, fix). The diary (or record) of the computation process then contains two entries: x andf(x), with x being the first and f(x) the second. Thus, the diary representing each c o m p u tation constitutes an ordered pair, (x, f(x)), o f entries. Supp o s e a c o m p u t a t i o n takes a string f r o m the set {apple, atoyota, eve, axle, pop} and returns true if the string is a palindrome and false, otherwise. Then the diary will record the following: (apple,false), (atoyota,true), (eve,true), (axle,false), (pop,true). Because the function can be applied to different values x ¢ X to describe the function, we m u s t describe all possible computations; that is, all possible pairs (x,f(x)). W h e n we design a function, we do not k n o w which inputs x will be used first and which inputs will be used later. Because there is no specific order between the different pairs (x,f(x)), these pairs f o r m a set. Indeed, f r o m the c o m puter science viewpoint, it is natural to represent a function f a s a set o f ordered pairs (x,f(x)). ¢D < u. (1) ¢D e~ -o" An Intuitive Explanation In c o m p u t e r science we are m a i n l y interested in the functions that can be actually computed; that is, functions for which there exists an algorithm that transforms an arbitrary input x ¢ X into an output f(x). In other words, a function can be given as a program, a p r o g r a m function, or a p r o g r a m procedure. In s o m e cases, we k n o w the algorithm that c o m p u t e s fix) f r o m x. However, in m a n y cases we do not k n o w the algorithm (e.g., consider buying software f r o m a company). A c k n o w l e d g m e n t s : This w o r k was supported in part by the N S F under grant No. E E C - 9 3 2 2 3 7 0 and by N A S A under cooperative a g r e e m e n t N C C W - 0 0 9 . Reference [1] Bernat, A., W.J. Bradley, R.D. Cupper, and G.W. Scragg, Fundamentals of Computing I, McGraw Hill, New York, 1994. December 1997 Vol. 29 No. 4 dnro~cls SIGCSE Bulletin

Page 1 of 1

Page 1 of 1

Toggle back to continuous viewing mode

/lp/association-for-computing-machinery/why-is-a-function-defined-as-set-of-ordered-pairs-r4h7y3M6KK
Welcome to DeepDyve! Rent Premier Research Articles and Save Up to 90%

Learn more

Free Article

Bookmark

Why is a function defined as set of ordered pairs?

Gates, Ann Q.; Kreinovich, Vladik
ACM SIGCSE Bulletin , Volume 29 (4)
Association for Computing MachineryDec 1, 1997

More Info

More Like This Article

View All dataSource[]=actageo&dataSource[]=aspet&dataSource[]=aaos&dataSource[]=aacc&dataSource[]=aacr&dataSource[]=aea&dataSource[]=aip&dataSource[]=ajnr&dataSource[]=ams&dataSource[]=aps_physical&dataSource[]=appi_book&dataSource[]=appi_journal&dataSource[]=apha&dataSource[]=asip&dataSource[]=asm&dataSource[]=asn&dataSource[]=aspb&dataSource[]=avs&dataSource[]=annual_reviews&dataSource[]=arxiv&dataSource[]=acm&dataSource[]=berghahn&dataSource[]=cabi&dataSource[]=clinical_trials&dataSource[]=dailymed&dataSource[]=degruyter&dataSource[]=du_press&dataSource[]=esa&dataSource[]=eu_press&dataSource[]=elsevier&dataSource[]=emerald&dataSource[]=ejtr&dataSource[]=emea&dataSource[]=epo&dataSource[]=faseb&dataSource[]=gsa&dataSource[]=health_affairs&dataSource[]=hindawi&dataSource[]=imanager&dataSource[]=imedpub&dataSource[]=informa_healthcare&dataSource[]=informs&dataSource[]=iop&dataSource[]=iucr&dataSource[]=iospress&dataSource[]=jbjs&dataSource[]=leftcoast&dataSource[]=lu_press&dataSource[]=mesharpe&dataSource[]=mary_ann_liebert&dataSource[]=medline&dataSource[]=mit_press&dataSource[]=nature&dataSource[]=oxford&dataSource[]=pier_professional&dataSource[]=pnas&dataSource[]=portlandpress&dataSource[]=psyc_articles&dataSource[]=psyc_books&dataSource[]=psyc_critiques&dataSource[]=plos_journal&dataSource[]=pubmed_central&dataSource[]=rsna&dataSource[]=rockefeller&dataSource[]=rcn&dataSource[]=ria&dataSource[]=rsc&dataSource[]=sage&dataSource[]=spie&dataSource[]=springer_journal&dataSource[]=springer&dataSource[]=taylor_francis&dataSource[]=aps&dataSource[]=the_scientist&dataSource[]=uc_press&dataSource[]=uspto_abstract&dataSource[]=wiley&dataSource[]=pct

Browse: Subject Areas | Journals | Publishers

Sign Up for a DeepDyve Account

Bookmark an Article

To bookmark an article, please log in first, or sign up for a DeepDyve account if you don't already have one.

OK

Subscribe to Journal Email Alerts

To subscribe to email alerts, please log in first, or sign up for a DeepDyve account if you don't already have one.

OK

Thank you for renting with DeepDyve

Your PayPal account has been charged $2.99. You now have access to the full text of this article. A rental receipt has also been sent to your email address.

Your credit card has been charged $2.99. You now have access to the full text of this article. A rental receipt has also been sent to your email address.

OK

New! You can now keep track of new articles from ACM SIGCSE Bulletin on your personalized homepage! Learn more

PDF Download — Not Available

Thanks for your interest in purchasing the PDF. Your request has been noted and we will work with our publisher partner to discuss enabling this feature.

In the meantime, you can get the PDF by visiting the publisher site.

Thank you for purchasing with DeepDyve

Your PayPal account has been charged $.

Your credit card has been charged $.

You can now download this article. A purchase receipt has also been sent to your email address.

Download This Article or I'm done with my download

Print Page — Not Available

Thanks for your interest in printing individual pages. Your request has been noted and we will work with our publisher partner to discuss enabling this feature.

In the meantime, you can get the PDF by visiting the publisher site.

Thank you for printing with DeepDyve

Your PayPal account has been charged $0.

Your credit card has been charged $0.

You can now print this article. A purchase receipt has also been sent to your email address.

Print the Selected Pages or I'm done with my printing

Please refresh to generate a new download link

Your article download link has expired. Please refresh this page to obtain a new download link and try again.

Follow a Journal

To get new article updates from a journal on your personalized homepage, please log in first, or sign up for a DeepDyve account if you don't already have one.

OK