Efficient graph algorithms using lazy monolithic arrays
Many, perhaps even most, algorithms that involve data structures are traditionally expressed by incremental updates of the data structures. In functional languages, however, incremental updates are usually both clumsy and inefficient, especially when the data structure is an array. In functional lan...
Saved in:
| Published in | Journal of functional programming Vol. 8; no. 4; pp. 323 - 333 |
|---|---|
| Main Author | |
| Format | Journal Article |
| Language | English |
| Published |
Cambridge University Press
01.07.1998
|
| Online Access | Get full text |
| ISSN | 0956-7968 1469-7653 1469-7653 |
| DOI | 10.1017/S0956796898003062 |
Cover
| Abstract | Many, perhaps even most, algorithms that involve data structures
are traditionally
expressed by incremental updates of the data structures. In functional
languages,
however, incremental updates are usually both clumsy and inefficient, especially
when the data structure is an array. In functional languages, we instead prefer to express such array algorithms
using
monolithic arrays – wholesale creation of the final answer
– both for succinctness of
expression, efficiency (only one array created) and (sometimes) implicit
parallelism.
The ease with which the solution can be reformulated of course depends
on the
problem, and varies from trivial (e.g. matrix multiplication), to challenging
(e.g.
solving linear equation systems using Gauss elimination, which in fact
can be done
by creating only two arrays, recursively defined, of which one is the answer).
Other
problems have been notoriously resistant to attack; these usually involve
some
unpredictable processing order of the elements. One such problem is graph
marking,
i.e. marking the nodes reachable from a set of roots. Hitherto, no functional
method
has been known except emulating the traditional imperative solution (King
&
Launchbury, 1995; Launchbury & Peyton Jones, 1995). The contribution of this paper is to show how this problem, and some
related
ones, can be solved using a novel array creation primitive, lazier than
previous ones. |
|---|---|
| AbstractList | Many, perhaps even most, algorithms that involve data structures
are traditionally
expressed by incremental updates of the data structures. In functional
languages,
however, incremental updates are usually both clumsy and inefficient, especially
when the data structure is an array. In functional languages, we instead prefer to express such array algorithms
using
monolithic arrays – wholesale creation of the final answer
– both for succinctness of
expression, efficiency (only one array created) and (sometimes) implicit
parallelism.
The ease with which the solution can be reformulated of course depends
on the
problem, and varies from trivial (e.g. matrix multiplication), to challenging
(e.g.
solving linear equation systems using Gauss elimination, which in fact
can be done
by creating only two arrays, recursively defined, of which one is the answer).
Other
problems have been notoriously resistant to attack; these usually involve
some
unpredictable processing order of the elements. One such problem is graph
marking,
i.e. marking the nodes reachable from a set of roots. Hitherto, no functional
method
has been known except emulating the traditional imperative solution (King
&
Launchbury, 1995; Launchbury & Peyton Jones, 1995). The contribution of this paper is to show how this problem, and some
related
ones, can be solved using a novel array creation primitive, lazier than
previous ones. Many, perhaps even most, algorithms that involve data structures are traditionally expressed by incremental updates of the data structures. In functional languages, however, incremental updates are usually both clumsy and inefficient, especially when the data structure is an array. In functional languages, we instead prefer to express such array algorithms using monolithic arrays – wholesale creation of the final answer – both for succinctness of expression, efficiency (only one array created) and (sometimes) implicit parallelism. The ease with which the solution can be reformulated of course depends on the problem, and varies from trivial (e.g. matrix multiplication), to challenging (e.g. solving linear equation systems using Gauss elimination, which in fact can be done by creating only two arrays, recursively defined, of which one is the answer). Other problems have been notoriously resistant to attack; these usually involve some unpredictable processing order of the elements. One such problem is graph marking, i.e. marking the nodes reachable from a set of roots. Hitherto, no functional method has been known except emulating the traditional imperative solution (King & Launchbury, 1995; Launchbury & Peyton Jones, 1995). The contribution of this paper is to show how this problem, and some related ones, can be solved using a novel array creation primitive, lazier than previous ones. |
| Author | JOHNSSON, THOMAS |
| Author_xml | – sequence: 1 givenname: THOMAS surname: JOHNSSON fullname: JOHNSSON, THOMAS email: johnsson@cs.chalmers.se organization: Department of Computer Science, Chalmers University of Technology, S-412 96 Göteborg, Sweden; (e-mail: johnsson@cs.chalmers.se) |
| BookMark | eNp90M1qwzAMAGAzOljb7QF2ywtk809iO8dRuq1Q2KG9B8c_qYtjFztlZE-_lPbUjV4kkPiEpBmY-OA1AM8IviCI2OsGViVlFeUVh5BAiu_AFBW0yhktyQRMT-381H8As5T2EEKOSz4FbGmMlVb7PmujOOwy4doQbb_rUnZM1reZEz9D1gUf3Fi1MhMxiiE9gnsjXNJPlzwH2_fldvGZr78-Vou3dS4JQniMrCoKTTiGpKSccqlwY4pKS8oKprhRjKpCEi4abcbVGyV1Q0oucYONMmQO8Hns0R_E8C2cqw_RdiIONYL16fI6XV8-InRGMoaUojZ_zOYfw66MtL3obfB9FNbdlOQiRddEq1pd78Mx-vErN9QvYjV9lA |
| CitedBy_id | crossref_primary_10_1016_j_scico_2014_07_008 crossref_primary_10_1145_2544174_2500608 |
| ContentType | Journal Article |
| Copyright | 1998 Cambridge University Press |
| Copyright_xml | – notice: 1998 Cambridge University Press |
| DBID | AAYXX CITATION ADTOC UNPAY |
| DOI | 10.1017/S0956796898003062 |
| DatabaseName | CrossRef Unpaywall for CDI: Periodical Content Unpaywall |
| DatabaseTitle | CrossRef |
| DatabaseTitleList | CrossRef |
| Database_xml | – sequence: 1 dbid: UNPAY name: Unpaywall url: https://proxy.k.utb.cz/login?url=https://unpaywall.org/ sourceTypes: Open Access Repository |
| DeliveryMethod | fulltext_linktorsrc |
| Discipline | Computer Science |
| EISSN | 1469-7653 |
| EndPage | 333 |
| ExternalDocumentID | 10.1017/s0956796898003062 10_1017_S0956796898003062 |
| GroupedDBID | -1D -1F -2P -2V -E. -~6 -~N .DC .FH 09C 09E 0E1 0R~ 29K 4.4 5GY 5VS 6OB 6~7 74X 74Y 7~V 85S 8FE 8FG 8R4 8R5 9M5 AAAZR AABES AABWE AACJH AAFUK AAGFV AAKNA AAKTX AAMNQ AANRG AARAB AASVR AATMM AAUIS AAUKB ABBXD ABBZL ABEFU ABGDZ ABITZ ABJNI ABKKG ABMWE ABQTM ABQWD ABROB ABTCQ ABUWG ABVFV ABVKB ABVZP ABXAU ABXHF ABZCX ABZUI ACAJB ACBMC ACDLN ACEJA ACETC ACGFS ACIMK ACOZI ACRPL ACUIJ ACYZP ACZBM ACZUX ACZWT ADCGK ADDNB ADFEC ADKIL ADNMO ADOVH ADOVT ADVJH AEBAK AEBPU AEHGV AEMFK AEMTW AENCP AENEX AENGE AFFUJ AFKQG AFKRA AFLOS AFLVW AFUTZ AFZFC AGABE AGBYD AGJUD AGLWM AGQPQ AHQXX AHRGI AIGNW AIHIV AIOIP AISIE AJ7 AJCYY AJPFC AJQAS AKMAY AKZCZ ALMA_UNASSIGNED_HOLDINGS ALVPG ALWZO AMVHM ANOYL AQJOH ARABE ARAPS ARZZG ATUCA AUXHV AYIQA AZQEC BBLKV BCGOX BENPR BESQT BGHMG BGLVJ BJBOZ BLZWO BMAJL BPHCQ BQFHP C0O CAG CBIIA CCPQU CCQAD CCTKK CCUQV CDIZJ CFAFE CFBFF CGQII CHEAL CJCSC COF CS3 D-I DC4 DOHLZ DU5 DWQXO EBS EGQIC EJD GNUQQ HCIFZ HG- HST I.6 I.7 I.9 IH6 IKXGN IOEEP IOO IPYYG IS6 I~P J36 J38 J3A JHPGK JQKCU K6V K7- KAFGG KCGVB KFECR L98 LHUNA LW7 M-V M48 M7~ M8. NIKVX NMFBF NZEOI OK1 OYBOY P2P P62 PHGZM PHGZT PQQKQ PROAC PYCCK Q2X RAMDC RCA RIG ROL RR0 S6- S6U SAAAG T9M TWZ UT1 WFFJZ WQ3 WXU WYP YYM ZDLDU ZJOSE ZMEZD ZY4 ZYDXJ ~V1 AAYXX CITATION PQGLB PUEGO ADTOC UNPAY |
| ID | FETCH-LOGICAL-c3112-c37944e3820356868cd2bf49ec6747d8fd76d4c38abef980bdceb358c2b2fdf3 |
| IEDL.DBID | IKXGN |
| ISSN | 0956-7968 1469-7653 |
| IngestDate | Tue Aug 19 18:31:55 EDT 2025 Thu Apr 24 23:04:45 EDT 2025 Wed Oct 01 04:12:11 EDT 2025 Tue Jul 08 01:56:03 EDT 2025 |
| IsDoiOpenAccess | false |
| IsOpenAccess | true |
| IsPeerReviewed | true |
| IsScholarly | true |
| Issue | 4 |
| Language | English |
| License | https://www.cambridge.org/core/terms |
| LinkModel | DirectLink |
| MergedId | FETCHMERGED-LOGICAL-c3112-c37944e3820356868cd2bf49ec6747d8fd76d4c38abef980bdceb358c2b2fdf3 |
| OpenAccessLink | https://proxy.k.utb.cz/login?url=https://www.cambridge.org/core/services/aop-cambridge-core/content/view/2853872041BCA4DD4C58A672369FBAFE/S0956796898003062a.pdf/div-class-title-efficient-graph-algorithms-using-lazy-monolithic-arrays-div.pdf |
| PageCount | 11 |
| ParticipantIDs | unpaywall_primary_10_1017_s0956796898003062 crossref_primary_10_1017_S0956796898003062 crossref_citationtrail_10_1017_S0956796898003062 cambridge_journals_10_1017_S0956796898003062 |
| ProviderPackageCode | CITATION AAYXX |
| PublicationCentury | 1900 |
| PublicationDate | 1998-07 |
| PublicationDateYYYYMMDD | 1998-07-01 |
| PublicationDate_xml | – month: 07 year: 1998 text: 1998-07 |
| PublicationDecade | 1990 |
| PublicationTitle | Journal of functional programming |
| PublicationTitleAlternate | J. Funct. Prog |
| PublicationYear | 1998 |
| Publisher | Cambridge University Press |
| Publisher_xml | – name: Cambridge University Press |
| SSID | ssj0008258 |
| Score | 1.5066123 |
| Snippet | Many, perhaps even most, algorithms that involve data structures
are traditionally
expressed by incremental updates of the data structures. In functional... |
| SourceID | unpaywall crossref cambridge |
| SourceType | Open Access Repository Enrichment Source Index Database Publisher |
| StartPage | 323 |
| SummonAdditionalLinks | – databaseName: Unpaywall dbid: UNPAY link: http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMw3V1LbxMxELZKeoALLS9RoJUPnIDJJvuwvcdtmqjiUCHRSuUUje3dtmJJojxA6Z_kr_ATGHsffUSqxJXLXtaeWY3n5fX4G8be0w5AoUQD_dQixH20gNYYsNL2YtRIUd9XW5yI47P483lyvsV-N3dhXFlli3HgT_J9f7RFbTgBTmfQvgf_ztV0k4MO3K_0IKTwo1zjlf7hIIuPjuJBojIhw0iko8NsNAy-OuQ9mQqVKp8vh9id2SKwVz_BuHwV_CJB7gEciCx44GjA8mJKu_XLHwtwBekXUOL1GkhTXJXa5ZUBnM9xvQCi4-g9Ytsioc1Bh22fnXzJvjWIf45xdd8pBSmSqDln7TtY03sfdhvt4U7UfLyazHD9C8vyVigc7bA_jRCrCpjv3dVSd831PXzJ_0jKu-xpnbbzrLKzZ2wrnzxnO01LDF57yBdMDhte3PPiN7y458UdL37Di1e8XrLT0fB0cAx1bwowEaWo9CRHFucRJVBRIpRQxoa6iNPcCNqgWVVYKWxsIoU6L0gI2ppcR4kyoQ4LW0SvWGcyneSvGTe6CDE1IkKyjp4kspTSoqQgRIQpmd1jn9qlGNcOZjGuivPkeEPQe6zXaMrY1DDvrttI-dCUD-2UWYVx8tDgj636bYze0OE3_zT6LXtSXfl01dDvWGc5X-X7lPMt9UFtR38BaLJRNw priority: 102 providerName: Unpaywall |
| Title | Efficient graph algorithms using lazy monolithic arrays |
| URI | https://www.cambridge.org/core/product/identifier/S0956796898003062/type/journal_article https://www.cambridge.org/core/services/aop-cambridge-core/content/view/2853872041BCA4DD4C58A672369FBAFE/S0956796898003062a.pdf/div-class-title-efficient-graph-algorithms-using-lazy-monolithic-arrays-div.pdf |
| UnpaywallVersion | publishedVersion |
| Volume | 8 |
| hasFullText | 1 |
| inHoldings | 1 |
| isFullTextHit | |
| isPrint | |
| journalDatabaseRights | – providerCode: PRVAEN databaseName: Cambridge University Press Wholly Gold Open Access Journals customDbUrl: eissn: 1469-7653 dateEnd: 99991231 omitProxy: true ssIdentifier: ssj0008258 issn: 1469-7653 databaseCode: IKXGN dateStart: 19910101 isFulltext: true titleUrlDefault: http://journals.cambridge.org/action/login providerName: Cambridge University Press – providerCode: PRVEBS databaseName: EBSCOhost Mathematics Source - HOST customDbUrl: eissn: 1469-7653 dateEnd: 99991231 omitProxy: false ssIdentifier: ssj0008258 issn: 1469-7653 databaseCode: AMVHM dateStart: 19910101 isFulltext: true titleUrlDefault: https://www.ebsco.com/products/research-databases/mathematics-source providerName: EBSCOhost |
| link | http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV1LT8JAEN4gHPTi24iv7MGT2oBt6W6PxICoCTERknpqprstkNRCWojBX-9sX0FISLy0l93J7uxjZna__YaQW4wAODAQ2qMtQTMfQWoghdAkk00TPECrn6It-lZvaL46LadCnOItjIJVlhwH6U1-mh9tltGfNiYyw9D4ceNDUegx2-I2Tx1fvaEOLRv5ELi54ndIDT0Yg1dJ7eXNee6XuzRGRrzg4VNSihvPlE56TfIq78If-7W7iGaw_IYwXDFK3UOyn3uTtJ214ohU_OiYHBSZGmi-cE8I66RMEdgrmjJUUwhH03gyH38lVCHfRzSEnyXFKangcOOJoBDHsExOyaDbGTz1tDxlgiYM9Jzwi-vL9A2060bL4hYXUvcC0_aFhXGD5IFkljSFwcHzA-yeJwVG0y0udE8PZGCckWo0jfxzQoUX6GALywActCZDsehpAcO9EQWjj1UnD6VO3FzpiZthxpi7ocI6aRZqc0XOPq6SYITbqtyVVWYZ9ca2wvflWGyUTtZLX_yv8ZdkL3uKqFC6V6Q6jxf-Nfoic-8mn1b4H_bf25-_7FPXMA |
| linkProvider | Cambridge University Press |
| linkToHtml | http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV07b8IwELYoDHTpuyp9eujUNgKSEDtjVUGhUJZSKVt0sRNASgNKQBX99b08RUFC6pLJPtl3tu8u_vwdIfeYAXBgIJSmKUHRmyAVkEIoksmGDg6g10_QFkOj-6m_WS2rRKz8LUwMqyw4DpKb_KQ-2jylP61PZYqhccP6R0yhx0yDmzwJfNV6_NOynpnAzhS_RyroMDmu_Uqvb70Oi1MaMyOe8_DFUvIbz4ROekPyOu_CH_9VXQZzWH2D7685pc4ROciiSfqcjuKYlNzghBzmlRpotnFPCWsnTBE4K5owVFPwx7Nwuph8RTRGvo-pDz8riksyhsNNpoJCGMIqOiOjTnv00lWykgmK0DBywi_uL93V0K9rLYMbXEjV8XTTFQbmDZJ7khlSFxoHx_Vweo4UmE23uFAd1ZOedk7KwSxwLwgVjqeCKQwN0GgNhmIx0gKGZyMKxhirRp4KndiZ0iM7xYwxe0uFNdLI1WaLjH08LoLh7-ryUHSZp9Qbuxo_FrbYah1ttr783-DvSLU7eh_Yg96wf0X202eJMWL3mpQX4dK9wbhk4dxmS-wXdYTYdQ |
| linkToUnpaywall | http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMw3V1LbxMxELZKeoALLS9RoJUPnIDJJvuwvcdtmqjiUCHRSuUUje3dtmJJojxA6Z_kr_ATGHsffUSqxJXLXtaeWY3n5fX4G8be0w5AoUQD_dQixH20gNYYsNL2YtRIUd9XW5yI47P483lyvsV-N3dhXFlli3HgT_J9f7RFbTgBTmfQvgf_ztV0k4MO3K_0IKTwo1zjlf7hIIuPjuJBojIhw0iko8NsNAy-OuQ9mQqVKp8vh9id2SKwVz_BuHwV_CJB7gEciCx44GjA8mJKu_XLHwtwBekXUOL1GkhTXJXa5ZUBnM9xvQCi4-g9Ytsioc1Bh22fnXzJvjWIf45xdd8pBSmSqDln7TtY03sfdhvt4U7UfLyazHD9C8vyVigc7bA_jRCrCpjv3dVSd831PXzJ_0jKu-xpnbbzrLKzZ2wrnzxnO01LDF57yBdMDhte3PPiN7y458UdL37Di1e8XrLT0fB0cAx1bwowEaWo9CRHFucRJVBRIpRQxoa6iNPcCNqgWVVYKWxsIoU6L0gI2ppcR4kyoQ4LW0SvWGcyneSvGTe6CDE1IkKyjp4kspTSoqQgRIQpmd1jn9qlGNcOZjGuivPkeEPQe6zXaMrY1DDvrttI-dCUD-2UWYVx8tDgj636bYze0OE3_zT6LXtSXfl01dDvWGc5X-X7lPMt9UFtR38BaLJRNw |
| openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Efficient+graph+algorithms+using+lazy+monolithic+arrays&rft.jtitle=Journal+of+functional+programming&rft.au=JOHNSSON%2C+THOMAS&rft.date=1998-07-01&rft.pub=Cambridge+University+Press&rft.issn=0956-7968&rft.eissn=1469-7653&rft.volume=8&rft.issue=4&rft.spage=323&rft.epage=333&rft_id=info:doi/10.1017%2FS0956796898003062&rft.externalDocID=10_1017_S0956796898003062 |
| thumbnail_l | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=0956-7968&client=summon |
| thumbnail_m | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=0956-7968&client=summon |
| thumbnail_s | http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=0956-7968&client=summon |